From 23ec0471e0432d2d917db82454ba4a69cd5db403 Mon Sep 17 00:00:00 2001 From: Gsk54 Date: Tue, 10 Jan 2023 12:13:37 +0100 Subject: [PATCH] test ci --check --- .gitlab-ci.yml | 18 +++++++++--------- ci/Dockerfile | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ee1396..f28dc54 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:ci - 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:ci +# 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 diff --git a/ci/Dockerfile b/ci/Dockerfile index e588c89..4b2a20c 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -22,5 +22,8 @@ RUN npx prisma generate # Create a "dist" folder RUN npm run build +# Run unit tests +RUN npm run test:unit:ci + # Start the server CMD [ "node", "dist/main.js" ]