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:
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci up -d
- sleep 30
- npm install
- npm run test:integration
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci logs
- docker exec -t v3-user sh -c "npm run test:integration"
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

@ -19,8 +19,5 @@ COPY . .
# Creates a "dist" folder
RUN npm run build
# Execute unit tests
RUN npm run test:unit
# 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'
services:
# api:
# container_name: v3-user
# build:
# dockerfile: ci/Dockerfile
# context: .
# env_file:
# - ci/.env.ci
# ports:
# - 5001:5001
# depends_on:
# - db-test
# - broker
# networks:
# v3-network:
# aliases:
# - v3-user-api
api:
container_name: v3-user
build:
dockerfile: ci/Dockerfile
context: .
env_file:
- ci/.env.ci
ports:
- 5001:5001
depends_on:
- db-test
- broker
networks:
v3-network:
aliases:
- v3-user-api
db-test:
container_name: v3-user-db-test