diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index dc379e3..a7a8416 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -36,5 +36,7 @@ jobs: run: npm install --force - name: Install dotenv-cli for dotenv cli run: npm install -g dotenv-cli + - name: Initialize Prisma Client + run: npm run ci:init - name: Run Unit Test run: npm run ci:unit diff --git a/package.json b/package.json index 2384436..65fac56 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,12 @@ "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", - "ci:unit": "dotenv -e .ci.env -- npx prisma db push && jest --setupFiles jest --config ./test/jest-unit.json --runInBand", - "ci:e2e": "dotenv -e .ci.env -- npx prisma db push && jest --config ./test/jest-e2e.json --runInBand", - "test:e2e": "dotenv -e .test.env -- npx prisma db push && jest --config ./test/jest-e2e.json --runInBand", - "test:unit": "dotenv -e .test.env -- npx prisma db push && jest --setupFiles jest --config ./test/jest-unit.json --runInBand" + "ci:init": "dotenv -e .ci.env -- npx prisma generate", + "ci:unit": "dotenv -e .ci.env -- jest --setupFiles jest --config ./test/jest-unit.json --runInBand", + "ci:e2e": "dotenv -e .ci.env -- jest --config ./test/jest-e2e.json --runInBand", + "test:init": "dotenv -e .test.env -- npx prisma generate", + "test:e2e": "dotenv -e .test.env -- jest --config ./test/jest-e2e.json --runInBand", + "test:unit": "dotenv -e .test.env -- jest --setupFiles jest --config ./test/jest-unit.json --runInBand" }, "dependencies": { "@aws-sdk/client-s3": "^3.465.0",