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 27, 2024
1 parent d2b070f commit b38ad8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
command: >
sh -c "
npm install
npx nx run db:push &&
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 b38ad8f

Please sign in to comment.