Skip to content

Commit

Permalink
ci: add main pipeline (build and test)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnghia committed Jan 9, 2024
1 parent 81d43ce commit b643f65
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Main

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"

services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

0 comments on commit b643f65

Please sign in to comment.