Skip to content

Commit

Permalink
Fix: have postgresql available in vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
jackbravo committed Jan 4, 2023
1 parent 1d5757f commit 8cdd302
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
vitest:
name: ⚡ Vitest
runs-on: ubuntu-latest
env:
DATABASE_URL: postgresql://lab_user:lab_pass@localhost/lab_test
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
Expand All @@ -76,6 +78,16 @@ jobs:
with:
useLockFile: false

- uses: harmon758/postgresql-action@v1
with:
postgresql version: "12"
postgresql db: lab_test
postgresql user: lab_user
postgresql password: lab_pass

- name: 🛠 Setup Database
run: npx prisma migrate reset --force

- name: ⚡ Run vitest
run: npm run test -- --coverage

Expand All @@ -96,7 +108,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16

- uses: harmon758/postgresql-action@v1
with:
postgresql version: "12"
Expand Down

0 comments on commit 8cdd302

Please sign in to comment.