-
Notifications
You must be signed in to change notification settings - Fork 60
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 #909 from AlexVCaron/fix/separate_codecov_job
Ability to resume workflow when codecov push fails
- Loading branch information
Showing
2 changed files
with
40 additions
and
9 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
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 |
---|---|---|
|
@@ -20,8 +20,9 @@ jobs: | |
test: | ||
runs-on: scilus-runners | ||
if: github.repository == 'scilus/scilpy' | ||
|
||
steps: | ||
- name: Checkout repository for merge | ||
- name: Checkout repository at merge | ||
uses: actions/checkout@v4 | ||
|
||
- name: Fetch python version from repository | ||
|
@@ -55,19 +56,46 @@ jobs: | |
export C_INCLUDE_PATH=$pythonLocation/include/python${{ steps.python-selector.outputs.python-version }}:$C_INCLUDE_PATH | ||
pytest --cov-report term-missing:skip-covered | ||
- name: Save test results and coverage | ||
uses: actions/upload-artifact@v4 | ||
id: test-coverage-results | ||
with: | ||
name: test-coverage-${{ github.run_id }} | ||
retention-days: 1 | ||
path: | | ||
.coverage | ||
.test_reports/ | ||
coverage: | ||
runs-on: scilus-runners | ||
if: github.repository == 'scilus/scilpy' | ||
needs: test | ||
|
||
steps: | ||
- name: Checkout repository at merge | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python for codecov upload | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
|
||
- name: Install pycoverage | ||
run: pip install coverage | ||
|
||
- name: Download test results and coverage | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: test-coverage-${{ github.run_id }} | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: unittests | ||
name: scilpy-unittests-${{ github.run_id }} | ||
name: scilpy-unittests-${{ github.run_id }}-${{ github.run_attempt }} | ||
verbose: true | ||
fail_ci_if_error: true | ||
plugin: pycoverage | ||
|
||
- name: Upload test reports and coverage to artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: test-reports | ||
path: | | ||
.test_reports/* |