Skip to content

Commit

Permalink
Add postgres service to CI tests to allow for intergation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paustint committed Feb 3, 2025
1 parent e866993 commit 16928b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
PRISMA_TEST_DB_URI: postgres://postgres:postgres@localhost:5432/postgres

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

steps:
- uses: actions/checkout@v4
name: Checkout [master]
Expand All @@ -42,6 +60,13 @@ jobs:
- name: install dependencies
run: yarn install --frozen-lockfile

# Run database migrations
- name: Generate database
run: yarn db:generate

- name: Run database migration
run: yarn db:migrate

- name: Test all affected projects
env:
NODE_OPTIONS: '--max_old_space_size=4096'
Expand Down

0 comments on commit 16928b0

Please sign in to comment.