Skip to content

Commit 08cde55

Browse files
committed
Generate the prisma client before running the unit tests
1 parent 1f6c86d commit 08cde55

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ jobs:
2727
- name: 📥 Download deps
2828
run: pnpm install --frozen-lockfile
2929

30+
- name: 📀 Generate Prisma Client
31+
run: pnpm run generate
32+
3033
- name: 🧪 Run Unit Tests
3134
run: pnpm run test

internal-packages/testcontainers/src/utils.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ export async function createPostgresContainer() {
99
// Run migrations
1010
const databasePath = path.resolve(__dirname, "../../database");
1111

12-
execSync(`npx [email protected] generate --schema ${databasePath}/prisma/schema.prisma`, {
13-
env: {
14-
...process.env,
15-
DATABASE_URL: container.getConnectionUri(),
16-
DIRECT_URL: container.getConnectionUri(),
17-
},
18-
});
19-
2012
execSync(`npx [email protected] db push --schema ${databasePath}/prisma/schema.prisma`, {
2113
env: {
2214
...process.env,

0 commit comments

Comments
 (0)