Generic test job that also runs on release merge requests

This commit is contained in:
Romain Thouvenin 2024-04-02 12:01:38 +02:00
parent f759581157
commit 5696ac57bd
1 changed files with 4 additions and 4 deletions

View File

@ -22,11 +22,11 @@ test:
services: services:
- docker:dind - docker:dind
script: script:
- docker-compose -f docker-compose.ci.tools.yml -p matcher-tools --env-file ci/.env.ci up -d - docker-compose -f docker-compose.ci.tools.yml -p $CI_PROJECT_NAME-tools --env-file ci/.env.ci up -d
- sh ci/wait-up.sh - sh ci/wait-up.sh
- docker-compose -f docker-compose.ci.service.yml -p matcher-service --env-file ci/.env.ci up -d - docker-compose -f docker-compose.ci.service.yml -p $CI_PROJECT_NAME-service --env-file ci/.env.ci up -d
- docker exec -t v3-matcher-api sh -c "npm run test:integration:ci" - docker exec -t v3-$CI_PROJECT_NAME-api sh -c "npm run test:integration:ci"
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/ coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
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_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^release/ || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always when: always