diff --git a/.gitlab/CI/build-post.gitlab-ci.yml b/.gitlab/CI/build-post.gitlab-ci.yml index 4ee0eea633..4935e9360f 100644 --- a/.gitlab/CI/build-post.gitlab-ci.yml +++ b/.gitlab/CI/build-post.gitlab-ci.yml @@ -1,5 +1,5 @@ .tests: &tests - extends: .recompile + extends: .recompile-branch stage: build-post tags: - veloren-docker @@ -13,8 +13,12 @@ unittests: max: 2 coverage: - <<: *tests + # Run on master and branches + extends: .recompile allow_failure: true + stage: build-post + tags: + - veloren-docker script: - ln -s /dockercache/cache-tarpaulin target - cargo tarpaulin -v diff --git a/.gitlab/CI/check-compile.gitlab-ci.yml b/.gitlab/CI/check-compile.gitlab-ci.yml index b4de57ba09..5bc50a24d5 100644 --- a/.gitlab/CI/check-compile.gitlab-ci.yml +++ b/.gitlab/CI/check-compile.gitlab-ci.yml @@ -1,5 +1,5 @@ check: - extends: .recompile + extends: .recompile-branch stage: check-compile tags: - veloren-docker @@ -8,7 +8,7 @@ check: - RUSTFLAGS="-D warnings" cargo check --locked code-quality: - extends: .recompile + extends: .recompile-branch stage: check-compile tags: - veloren-docker @@ -18,7 +18,7 @@ code-quality: - cargo fmt --all -- --check security: - extends: .recompile + extends: .recompile-branch stage: check-compile allow_failure: true tags: diff --git a/.gitlab/CI/recompile.yml b/.gitlab/CI/recompile.yml index 00efba2003..57526bc952 100644 --- a/.gitlab/CI/recompile.yml +++ b/.gitlab/CI/recompile.yml @@ -1,5 +1,5 @@ # Template to only run if actual changes has been made to the code and not just documentation -.recompile: +.recompile-branch: rules: - if: $CI_COMMIT_REF_NAME !~ /^master$/ # No '-' here is *very* important: https://docs.gitlab.com/ee/ci/yaml/#complex-rule-clauses @@ -8,3 +8,12 @@ - "rust-toolchain" - ".gitlab-ci.yml" - "**/*.yml" + +# like .recompile-branch but will run on master too +.recompile: + rules: + - changes: + - "**/*.{rs,ron,toml,vox,png}" + - "rust-toolchain" + - ".gitlab-ci.yml" + - "**/*.yml"