Skip to content

Commit

Permalink
Upload LCOV files
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacetown committed Oct 15, 2024
1 parent 2011024 commit aee5eac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,18 @@ jobs:
run: |
cspell
upload-lcov:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Upload LCOV coverage
uses: actions/upload-artifact@v4
with:
name: "coverage-lcov"
path: ./tests/nested/reference/**/coverage.lcov

host:
needs: [changelog-check, spell-check]
needs: [changelog-check, spell-check, upload-lcov]
uses: ./.github/workflows/gcovr-ci-job.yml
with:
os: ${{ matrix.os }}
Expand Down Expand Up @@ -129,7 +139,7 @@ jobs:


docker:
needs: [changelog-check, spell-check]
needs: [changelog-check, spell-check, upload-lcov]
uses: ./.github/workflows/gcovr-ci-job.yml
with:
container: true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/upload_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload coverage files to Codacy
if: ${{ (github.repository == 'gcovr/gcovr') }}
# if: ${{ (github.repository == 'gcovr/gcovr') }}
run: |
# Search the coverage files and upload them
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l python --force-coverage-parser cobertura $(find . -name 'coverage.xml' -print | sed -e 's/^/ -r /' | tr -d '\n')
# Do not upload lcov because of https://github.com/codacy/codacy-coverage-reporter/issues/510#issuecomment-2297469928
# bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l C --force-coverage-parser lcov $(find . -regex '.*/nested/reference/.*/coverage\.lcov' -print | sed -e 's/^/ -r /' | tr -d '\n')
ls -alR coverage-*
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l python --force-coverage-parser cobertura -r 'coverage-*/coverage.xml'
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l C --force-coverage-parser lcov -r 'coverage-lcov/*.lcov'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

- name: Finalize the upload to Codacy
if: ${{ always() && (github.repository == 'gcovr/gcovr') }}
# if: ${{ always() && (github.repository == 'gcovr/gcovr') }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) final
env:
Expand Down

0 comments on commit aee5eac

Please sign in to comment.