File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ certificates
6
6
/playwright-report /
7
7
/blob-report /
8
8
/playwright /.cache /
9
- /coverage
9
+ /coverage
10
+ * -jestCoverageReport.json
Original file line number Diff line number Diff line change @@ -7,8 +7,14 @@ docker compose -f docker-compose-integration.yaml up -d
7
7
# wait for flyway to finish running before...
8
8
docker compose -f docker-compose-integration.yaml logs -f flyway | grep -q " Successfully applied\|No migration necessary"
9
9
10
+ BASE_CMD=" DATABASE_URL=postgresql://postgres:pw@localhost:5432/tefca_db TEST_TYPE=integration jest --testPathPattern=tests/integration"
10
11
# running our integration tests
11
- DATABASE_URL=postgresql://postgres:pw@localhost:5432/tefca_db TEST_TYPE=integration jest --testPathPattern=tests/integration --ci --json --coverage --testLocationInResults --outputFile=/coverage/integration/report.json
12
+ if [ " $GENERATE_COVERAGE_REPORT " = " true" ]; then
13
+ JEST_CMD=" $BASE_CMD --ci --json --coverage --testLocationInResults --outputFile=integration-jestCoverageReport.json"
14
+ else
15
+ JEST_CMD=" $BASE_CMD "
16
+ fi
17
+ eval $JEST_CMD
12
18
JEST_EXIT_CODE=$?
13
19
14
20
# Teardown containers
Original file line number Diff line number Diff line change 13
13
"start" : " NODE_TLS_REJECT_UNAUTHORIZED=0 node .next/standalone/server.js" ,
14
14
"lint" : " next lint" ,
15
15
"test" : " npm run test:unit && npm run test:integration" ,
16
+ "test:ci" : " npm run test:unit:ci && npm run test:integration:ci" ,
16
17
"test:unit" : " jest --testPathIgnorePatterns='/e2e/' '/integration/'" ,
17
- "test:unit:ci" : " npm run test:unit -- --ci --json --coverage --testLocationInResults --outputFile=./ unit/report .json" ,
18
+ "test:unit:ci" : " npm run test:unit -- --ci --json --coverage --testLocationInResults --outputFile=unit-jestCoverageReport .json " ,
18
19
"test:unit:watch" : " jest --watch" ,
19
20
"test:integration" : " bash ./integration.sh" ,
21
+ "test:integration:ci" : " GENERATE_COVERAGE_REPORT=true bash ./integration.sh" ,
20
22
"test:playwright" : " docker compose -f ./docker-compose-e2e.yaml build --no-cache && docker compose -f ./docker-compose-e2e.yaml up -d && npx playwright test --reporter=list" ,
21
23
"test:playwright:local" : " dotenv -e ./.env -- npx playwright test --ui" ,
22
24
"cypress:open" : " cypress open" ,
You can’t perform that action at this time.
0 commit comments