fix(testing): Make sure tests run conditionally in branches and always on develop

This commit is contained in:
Georg Krause 2022-10-29 10:03:04 +02:00
parent f68cb880f3
commit 93fa14e1fa
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
1 changed files with 6 additions and 2 deletions

View File

@ -213,9 +213,11 @@ test_api:
image: $CI_REGISTRY/funkwhale/backend-test-docker:$PY_VER image: $CI_REGISTRY/funkwhale/backend-test-docker:$PY_VER
coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/' coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/'
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
changes: changes:
- api/**/* - api/**/*
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
test_front: test_front:
interruptible: true interruptible: true
@ -241,9 +243,11 @@ test_front:
tags: tags:
- docker - docker
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
changes: changes:
- front/**/* - front/**/*
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
build_docs: build_docs:
stage: build stage: build