test ci --check

This commit is contained in:
Gsk54 2023-01-09 16:52:22 +01:00
parent c459a3ea05
commit 543d1b6ce1
3 changed files with 4 additions and 5 deletions

View File

@ -18,7 +18,7 @@ test-api-dev:
services:
- docker:dind
script:
- docker-compose -f docker-compose.ci.yml --env-file .env.test up -d
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci up -d
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always

View File

@ -7,8 +7,7 @@ services:
dockerfile: ci/Dockerfile
context: .
env_file:
- .env.test
command: npm run test
- ci/.env.ci
ports:
- 5001:5001
depends_on:

View File

@ -15,14 +15,14 @@
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "npm run migrate-test && dotenv -e .env.test jest",
"test:ci": "npm run migrate-test-ci && dotenv -e ci/.env.ci jest",
"test:ci": "npm run migrate-test-ci && jest",
"test:unit": "jest --testPathIgnorePatterns 'integration' --verbose",
"test:integration": "npm run migrate-test && dotenv -e .env.test -- jest --testPathPattern 'integration' --verbose",
"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'",
"migrate-test": "dotenv -e .env.test -- npx prisma migrate dev --name postgres-init",
"migrate-test-ci": "dotenv -e ci/.env.ci -- npx prisma migrate dev --name postgres-init"
"migrate-test-ci": "npx prisma migrate dev --name postgres-init"
},
"dependencies": {
"@automapper/classes": "^8.7.7",