chore: Report coverage in a separate CI job
This commit is contained in:
parent
bd4b0feba9
commit
de9831c2c2
2 changed files with 19 additions and 7 deletions
|
@ -38,13 +38,9 @@ test:
|
|||
<<: *test_template
|
||||
image: "elixir:1.12.1-alpine"
|
||||
script:
|
||||
- script/cibuild
|
||||
- script/coverage-json-to-metrics
|
||||
- script/coverage-json-to-cobertura
|
||||
- script/cibuild covered
|
||||
artifacts:
|
||||
reports:
|
||||
metrics: metrics.txt
|
||||
cobertura: cover/cobertura.xml
|
||||
coverage_json: cover/excoveralls.json
|
||||
|
||||
credo:
|
||||
stage: test
|
||||
|
@ -94,6 +90,18 @@ build_image_for_commit:
|
|||
script:
|
||||
- script/ci-docker-build
|
||||
|
||||
report_coverage:
|
||||
stage: deploy_tags
|
||||
needs: ['test']
|
||||
image: "elixir:1.12.1-alpine"
|
||||
script:
|
||||
- script/coverage-json-to-metrics
|
||||
- script/coverage-json-to-cobertura
|
||||
artifacts:
|
||||
reports:
|
||||
metrics: metrics.txt
|
||||
cobertura: cover/cobertura.xml
|
||||
|
||||
# If tests pass, tag the commit and update package versions
|
||||
deploy_to_tags:
|
||||
stage: deploy_tags
|
||||
|
|
|
@ -12,6 +12,10 @@ mix deps.get
|
|||
mix ecto.create
|
||||
mix ecto.migrate
|
||||
|
||||
if [ $1 == 'covered' ]; then
|
||||
mix coveralls.json --umbrella
|
||||
else
|
||||
mix test
|
||||
fi;
|
||||
|
||||
script/restore-timestamps
|
||||
|
|
Loading…
Reference in a new issue