Skip to content

Commit

Permalink
Move coverage file to be detected by codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixS90 committed Jul 26, 2024
1 parent 6a8e263 commit e662af5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,20 @@ jobs:
env:
CovResultsPath: "${{ runner.temp }}\\cov_results\\cov.xml"
TestResultsPath: "${{ runner.temp }}\\results"
# Note: Need to move coverage file due to ongoing bugs with finding coverage files names differently than
# tool defaults and put under folders away from working directory
- name: Move coverage file for upload
if: success() || failure()
run: Move-Item -Path ${{ runner.temp }}\cov_results\cov.xml -Destination ${{ github.workspace }}\TestResults\coverage.xml
shell: pwsh
- name: Upload Coverage
if: success() || failure()
uses: codecov/codecov-action@v4
with:
# Hard copy from step above due to https://github.com/actions/runner/issues/2204
directory: ${{ runner.temp }}/cov_results
files: cov.xml
# In principle we could also omit directory and files due to the note above
directory: ${{ github.workspace }}/TestResults
files: coverage.xml
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit e662af5

Please sign in to comment.