Skip to content

Commit 1c490d1

Browse files
ci: make codacy reporter fail loudly
1 parent 01bbaad commit 1c490d1

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

‎.github/workflows/codacy.yml‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,33 @@ jobs:
2929

3030
- name: Download coverage report
3131
id: download
32-
continue-on-error: true
3332
uses: actions/download-artifact@v4
3433
with:
3534
name: coverage-reports-linux
35+
# without a token the action ignores run-id and looks in the current run
36+
github-token: ${{ github.token }}
3637
run-id: ${{ github.event.workflow_run.id }}
3738

3839
- name: Report python coverage
39-
if: ${{ !cancelled() && steps.download.outcome == 'success' && hashFiles('coverage.xml') != '' }}
40+
if: ${{ !cancelled() && steps.download.outcome == 'success' }}
4041
uses: codacy/codacy-coverage-reporter-action@v1
4142
with:
4243
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
4344
language: python
4445
coverage-reports: coverage.xml
4546

4647
- name: Report c++ coverage
47-
if: ${{ !cancelled() && steps.download.outcome == 'success' && hashFiles('coverage.info') != '' }}
48+
if: ${{ !cancelled() && steps.download.outcome == 'success' }}
4849
uses: codacy/codacy-coverage-reporter-action@v1
4950
with:
5051
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
5152
language: cpp
5253
coverage-reports: coverage.info
5354

5455
- name: Report c coverage
55-
if: ${{ !cancelled() && steps.download.outcome == 'success' && hashFiles('coverage.info') != '' }}
56+
if: ${{ !cancelled() && steps.download.outcome == 'success' }}
5657
uses: codacy/codacy-coverage-reporter-action@v1
5758
with:
5859
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
5960
language: c
6061
coverage-reports: coverage.info
61-
62-
- name: Warn when there is nothing to report
63-
if: ${{ !cancelled() && steps.download.outcome != 'success' }}
64-
run: echo "::warning::coverage-reports-linux not found in the Tests run, nothing was sent to Codacy"

0 commit comments

Comments
 (0)