Skip to content

Commit

Permalink
report_coverage in .gitlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 4, 2024
1 parent c6189c2 commit 775b4c8
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ stages:
- image
- lint
- test
- report

variables:
CODECOV_TOKEN: 4d2d8534-60ec-48b3-bf55-93b92f25913d
Expand Down Expand Up @@ -56,13 +57,13 @@ validate_code:
script:
- nox -s validate_code

tests:
stage: test
needs:
- job: "CI image"
optional: true
script:
- tox -e py39-fft,codecov
# tests:
# stage: test
# needs:
# - job: "CI image"
# optional: true
# script:
# - tox -e py39-fft,codecov

test_without_fft_and_pythran:
stage: test
Expand All @@ -71,3 +72,20 @@ test_without_fft_and_pythran:
optional: true
script:
- nox -s test_without_fft_and_pythran
artifacts:
paths:
- .coverage/*
expire_in: 10 mins

report_coverage:
stage: report
needs:
- job: test_without_fft_and_pythran
if: $CI_COMMIT_BRANCH == null
variables:
CI_COMMIT_BRANCH: $CI_COMMIT_HG_BRANCH
script:
- pip install coverage codecov
- make _report_coverage
- codecov --file .coverage/coverage.xml --commit $CI_COMMIT_SHA \
--branch $CI_COMMIT_BRANCH --name Heptapod$CI_JOB_ID

0 comments on commit 775b4c8

Please sign in to comment.