Skip to content

Commit

Permalink
build(fix): add DB to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
litsynp committed Oct 10, 2023
1 parent a596990 commit 9b59694
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
on: [ push, pull_request ]
on:
push:
branches: [ 'main', 'develop' ]
pull_request:
branches: [ 'main', 'develop' ]

name: CI

jobs:
check:
name: Check
runs-on: ubuntu-latest

services:
postgres:
image: postgres:12
env:
POSTGRES_DB: rust_todo_api_dev
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand Down Expand Up @@ -41,6 +62,9 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/rust_todo_api_dev


lints:
name: Lints
Expand Down

0 comments on commit 9b59694

Please sign in to comment.