Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,36 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
# workflow_run checks out the default branch, report the commit that was tested
ref: ${{ github.event.workflow_run.head_sha }}

- name: Download coverage report
id: download
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: coverage-reports-linux
# without a token the action ignores run-id and looks in the current run
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}

- name: Report python coverage
if: ${{ !cancelled() && steps.download.outcome == 'success' && hashFiles('coverage.xml') != '' }}
if: ${{ !cancelled() && steps.download.outcome == 'success' }}
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
language: python
coverage-reports: coverage.xml

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

- name: Report c coverage
if: ${{ !cancelled() && steps.download.outcome == 'success' && hashFiles('coverage.info') != '' }}
if: ${{ !cancelled() && steps.download.outcome == 'success' }}
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
language: c
coverage-reports: coverage.info

- name: Warn when there is nothing to report
if: ${{ !cancelled() && steps.download.outcome != 'success' }}
run: echo "::warning::coverage-reports-linux not found in the Tests run, nothing was sent to Codacy"
Loading