test ci --check
This commit is contained in:
parent
2caf8bbac6
commit
33b9a9e74f
|
@ -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'
|
||||
|
|
|
@ -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'",
|
||||
|
|
Loading…
Reference in New Issue