test ci --check

This commit is contained in:
Gsk54 2023-01-10 12:08:08 +01:00
parent 2caf8bbac6
commit 33b9a9e74f
2 changed files with 10 additions and 11 deletions

View File

@ -7,15 +7,15 @@ stages:
# TEST STAGE #
##############
# unit-test:
# stage: test
# image: node:18-alpine3.16
# script:
# - npm install
# - npm run test:unit
# rules:
# - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
# when: always
unit-test:
stage: test
image: node:18-alpine3.16
script:
- npm install
- npm run test:unit
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always
integration-test:
stage: test
@ -27,7 +27,6 @@ integration-test:
script:
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci up -d
- sh ci/wait-up.sh
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci logs
- docker exec -t v3-user sh -c "npm run test:integration:ci"
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

View File

@ -17,7 +17,7 @@
"test": "npm run migrate:test && dotenv -e .env.test jest",
"test:unit": "jest --testPathPattern 'tests/unit/' --verbose",
"test:integration": "npm run migrate:test && dotenv -e .env.test -- jest --testPathPattern 'tests/integration/' --verbose",
"test:integration:ci": "npm run migrate:test:ci && dotenv -e ci/.env.ci -- jest --testPathPattern 'tests/integration/' --verbose",
"test:integration:ci": "npm run migrate:test:ci && dotenv -e ci/.env.ci -- jest --testPathPattern 'tests/integration/'",
"test:cov": "npm run migrate:test && dotenv -e .env.test -- jest --coverage",
"test:e2e": "jest --config ./test/jest-e2e.json",
"migrate": "docker exec v3-user sh -c 'npx prisma migrate dev'",