From 33b9a9e74f456298b40e3d27d6a8cceb99982bf1 Mon Sep 17 00:00:00 2001 From: Gsk54 Date: Tue, 10 Jan 2023 12:08:08 +0100 Subject: [PATCH] test ci --check --- .gitlab-ci.yml | 19 +++++++++---------- package.json | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 92c6213..894ab1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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' diff --git a/package.json b/package.json index 35ce14d..29af8a4 100644 --- a/package.json +++ b/package.json @@ -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'",