Skip to content

Commit

Permalink
COVERAGE_DIR: .coverage_$CI_COMMIT_SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 4, 2024
1 parent 7525d95 commit 289fa8b
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ stages:
- report

variables:
CODECOV_TOKEN: 4d2d8534-60ec-48b3-bf55-93b92f25913d
# CODECOV_TOKEN: 4d2d8534-60ec-48b3-bf55-93b92f25913d
COVERAGE_DIR: .coverage_$CI_COMMIT_SHA

image: registry.heptapod.net:443/fluiddyn/fluidsim/ci/default:stable

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH

# check_bug:
# image: fluiddyn/python3-stable:lastest
# script:
Expand Down Expand Up @@ -68,10 +76,12 @@ test_without_fft_and_pythran:
optional: true
script:
- nox -s test_without_fft_and_pythran
- mkdir $COVERAGE_DIR
- cp -r .coverage/* $COVERAGE_DIR
artifacts:
paths:
- .coverage/*
expire_in: 10 mins
- $COVERAGE_DIR/*
expire_in: 60 mins

test_with_fft_and_pythran:
stage: test
Expand All @@ -80,18 +90,22 @@ test_with_fft_and_pythran:
optional: true
script:
- nox -s test_with_fft_and_pythran
- mkdir $COVERAGE_DIR
- cp -r .coverage/* $COVERAGE_DIR
artifacts:
paths:
- .coverage/*
expire_in: 10 mins
- $COVERAGE_DIR/*
expire_in: 60 mins


report_coverage:
stage: report
needs:
- job: "CI image"
optional: true
rules:
- when: on_success
script:
- pip install coverage
- make _report_coverage
- rm -rf .coverage/*

- coverage combine --data-file=$COVERAGE_DIR
- coverage report --data-file=$COVERAGE_DIR

0 comments on commit 289fa8b

Please sign in to comment.