Skip to content

Commit

Permalink
update the workflow so that it runs postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
joshghent committed Oct 8, 2024
1 parent 582c9be commit bb19b2b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:15
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

Expand All @@ -21,5 +34,14 @@ jobs:
- name: Install dependencies
run: go mod download

- name: Run migrations and seed data
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable
run: |
make migrate
make seed
- name: Run tests
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable
run: make test

0 comments on commit bb19b2b

Please sign in to comment.