test ci --check

This commit is contained in:
Gsk54 2023-01-10 12:13:37 +01:00
parent 39fa7da38a
commit 23ec0471e0
2 changed files with 12 additions and 9 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: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

View File

@ -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" ]