Merge branch 'songtronix/always-run-coverage' into 'master'

change(ci): run coverage on branch and master

See merge request veloren/veloren!1037
This commit is contained in:
Marcel 2020-06-03 09:50:46 +00:00
commit 8f8bb8d32f
3 changed files with 19 additions and 6 deletions

View File

@ -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

View File

@ -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:

View File

@ -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"