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
|
<<: *test_template
|
||||||
image: "elixir:1.12.1-alpine"
|
image: "elixir:1.12.1-alpine"
|
||||||
script:
|
script:
|
||||||
- script/cibuild
|
- script/cibuild covered
|
||||||
- script/coverage-json-to-metrics
|
|
||||||
- script/coverage-json-to-cobertura
|
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
coverage_json: cover/excoveralls.json
|
||||||
metrics: metrics.txt
|
|
||||||
cobertura: cover/cobertura.xml
|
|
||||||
|
|
||||||
credo:
|
credo:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -94,6 +90,18 @@ build_image_for_commit:
|
||||||
script:
|
script:
|
||||||
- script/ci-docker-build
|
- 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
|
# If tests pass, tag the commit and update package versions
|
||||||
deploy_to_tags:
|
deploy_to_tags:
|
||||||
stage: deploy_tags
|
stage: deploy_tags
|
||||||
|
|
|
@ -12,6 +12,10 @@ mix deps.get
|
||||||
mix ecto.create
|
mix ecto.create
|
||||||
mix ecto.migrate
|
mix ecto.migrate
|
||||||
|
|
||||||
mix coveralls.json --umbrella
|
if [ $1 == 'covered' ]; then
|
||||||
|
mix coveralls.json --umbrella
|
||||||
|
else
|
||||||
|
mix test
|
||||||
|
fi;
|
||||||
|
|
||||||
script/restore-timestamps
|
script/restore-timestamps
|
||||||
|
|
Loading…
Reference in a new issue