test ci --check

This commit is contained in:
Gsk54 2023-01-10 10:48:15 +01:00
parent df6c3d765d
commit 802e5f7f0a
3 changed files with 19 additions and 22 deletions

View File

@ -28,8 +28,8 @@ integration-test:
script: script:
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci up -d - docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci up -d
- sleep 30 - sleep 30
- npm install - docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci logs
- npm run test:integration - docker exec -t v3-user sh -c "npm run test:integration"
rules: rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always when: always

View File

@ -19,8 +19,5 @@ COPY . .
# Creates a "dist" folder # Creates a "dist" folder
RUN npm run build RUN npm run build
# Execute unit tests
RUN npm run test:unit
# Start the server using the production build # Start the server using the production build
# CMD [ "node", "dist/main.js" ] CMD [ "node", "dist/main.js" ]

View File

@ -1,22 +1,22 @@
version: '3.8' version: '3.8'
services: services:
# api: api:
# container_name: v3-user container_name: v3-user
# build: build:
# dockerfile: ci/Dockerfile dockerfile: ci/Dockerfile
# context: . context: .
# env_file: env_file:
# - ci/.env.ci - ci/.env.ci
# ports: ports:
# - 5001:5001 - 5001:5001
# depends_on: depends_on:
# - db-test - db-test
# - broker - broker
# networks: networks:
# v3-network: v3-network:
# aliases: aliases:
# - v3-user-api - v3-user-api
db-test: db-test:
container_name: v3-user-db-test container_name: v3-user-db-test