diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a99bf28..849e358 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/ci/Dockerfile b/ci/Dockerfile index ae2bc30..2361709 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -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" ] diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 83c814a..9335edf 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -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