-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4144 from GeotrekCE/update_ci_coverage
Fix CI to allow using last codecov action on reports generated in bionic
- Loading branch information
Showing
1 changed file
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,13 +145,39 @@ jobs: | |
./venv/bin/coverage combine | ||
./venv/bin/coverage xml -o coverage.xml | ||
# codecov-action version 3.1.4 is the last version supported by bionic (3.1.5 requires node 20) | ||
- uses: codecov/[email protected] | ||
- name: Save coverage | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
files: ./coverage.xml | ||
env_vars: OS,ENV | ||
token: ${{ secrets.CODECOV_TOKEN }} # not usually required for public repos | ||
fail_ci_if_error: true # optional (default = false) | ||
name: coverage_${{ matrix.os }}_${{ matrix.tests-env }} | ||
path: coverage.xml | ||
|
||
upload_coverage: | ||
name: Upload coverage to codecov | ||
runs-on: ubuntu-latest | ||
needs: [ test ] | ||
strategy: | ||
matrix: | ||
os: ['bionic-3.8', 'focal-3.8'] | ||
python-version: ['3.8'] | ||
tests-env: ['tests', 'tests_nds'] | ||
|
||
env: | ||
ENV: ${{ matrix.tests-env }} | ||
OS: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage_${{ matrix.os }}_${{ matrix.tests-env }} | ||
path: . | ||
|
||
- uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./coverage.xml | ||
env_vars: OS,ENV | ||
token: ${{ secrets.CODECOV_TOKEN }} # not usually required for public repos | ||
fail_ci_if_error: true # optional (default = false) | ||
|
||
build_docker_image: | ||
name: Build docker image | ||
|