Skip to content

Commit

Permalink
ci(db): apply migrations to E2E database with prisma migrate deploy
Browse files Browse the repository at this point in the history
Trying to make CI fail if migrations aren't committed
  • Loading branch information
tsa96 committed Sep 28, 2024
1 parent 6101045 commit 5d682d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ services:
- "3000:3000"
command: >
sh -c "
npm install
npx nx run db:push &&
npm install &&
npx nx run db:deploy &&
npx nx run backend-e2e:e2e
"
frontend-e2e:
Expand Down
7 changes: 7 additions & 0 deletions libs/db/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
"cwd": "libs/db/src"
}
},
"deploy": {
"executor": "nx:run-commands",
"options": {
"command": "prisma migrate deploy",
"cwd": "libs/db/src"
}
},
"create-migration": {
"executor": "nx:run-commands",
"options": {
Expand Down

0 comments on commit 5d682d8

Please sign in to comment.