Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixS90 committed Jul 26, 2024
1 parent e662af5 commit 7210808
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,22 @@ jobs:
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
# tool defaults and put under folders away from working directory in codecov v4
# code based on https://devblogs.microsoft.com/powershell-community/determine-if-a-folder-exists/
- 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
run: |-
$dest = ${{ github.workspace }}\TestResults
if (-Not (Test-Path -Path $dest)) {
New-Item -ItemType "directory" -Path $dest
}
Move-Item -Path ${{ runner.temp }}\cov_results\cov.xml -Destination $dest\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
# In principle we could also omit directory and files due to the note above
directory: ${{ github.workspace }}/TestResults
files: coverage.xml
# Relying on built-in search logic due to note above
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit 7210808

Please sign in to comment.