diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 578844ae9c2a1b0b921240d42e923e1135f0f594..5beae32d4df719651a1a6ea46102d285a0c00cd5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,21 +4,16 @@ stages: - test run_tests: + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' stage: test script: - go fmt ./... - go vet ./... - - go install gotest.tools/gotestsum@v1.7.0 - - gotestsum --junitfile report.xml --format testname -- -timeout 500s ./... - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - changes: - - frontend/**/* - - Dockerfile-frontend - when: never - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - go install gotest.tools/gotestsum@latest + - gotestsum --junitfile report.xml --format testname -- -timeout 500s artifacts: when: always reports: - junit: report.xml + junit: report.xm