From 8c4395056d38fd99fd8cb2f29ede65ed430cf958 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:05:37 +0000 Subject: [PATCH 1/5] deps: bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index 4866afa..a301efe 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -101,7 +101,7 @@ jobs: - name: Upload Coverage if: success() || failure() # Keep to v3 until issues revolving around coverage files not being found are resolved - uses: codecov/codecov-action@v3 + 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 From e662af51681281b89381730d7eb2557acf2f4007 Mon Sep 17 00:00:00 2001 From: Felix Scheffler Date: Fri, 26 Jul 2024 14:17:06 +0200 Subject: [PATCH 2/5] Move coverage file to be detected by codecov --- .github/workflows/build-reusable.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index f1e4a03..dd297da 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -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 }} From 7210808ce813dd8e55066579375a750212f35fc1 Mon Sep 17 00:00:00 2001 From: Felix Scheffler Date: Fri, 26 Jul 2024 15:16:46 +0200 Subject: [PATCH 3/5] Fix --- .github/workflows/build-reusable.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index dd297da..d40b404 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -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 }} From 15e1c6c8afd0d53d919633c4f77ac43e6bbf1198 Mon Sep 17 00:00:00 2001 From: Felix Scheffler Date: Fri, 26 Jul 2024 23:44:34 +0200 Subject: [PATCH 4/5] Fix --- .github/workflows/build-reusable.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index d40b404..35e4838 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -94,7 +94,8 @@ jobs: if: success() || failure() uses: codecov/codecov-action@v4 with: - # Relying on built-in search logic due to note above + directory: ${{ github.workspace }}/TestResults + files: coverage.xml fail_ci_if_error: true verbose: true token: ${{ secrets.CODECOV_TOKEN }} From f062a2fdc2e79f1fe93f1c2ebf652a4d07c0fd49 Mon Sep 17 00:00:00 2001 From: Felix Scheffler Date: Sat, 27 Jul 2024 00:13:09 +0200 Subject: [PATCH 5/5] Fix --- .github/workflows/build-reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index 35e4838..1254f27 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -84,11 +84,11 @@ jobs: - name: Move coverage file for upload if: success() || failure() run: |- - $dest = ${{ github.workspace }}\TestResults + $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 + Move-Item -Path "${{ runner.temp }}\cov_results\cov.xml" -Destination "$dest\coverage.xml" shell: pwsh - name: Upload Coverage if: success() || failure()