From 3a88484ee9d68727394f2f2bedc1ca31186cb87b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:32:27 +0000 Subject: [PATCH 1/3] deps(ci): 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/qa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index dd0b4adb3..eef70b872 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -75,7 +75,7 @@ jobs: # Use command substitution to preserve go binary path (sudo does not preserve path even with -E) sudo -E $(which go) test -race ${{ env.sudo_packages }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: /tmp/coverage.combined.out From 14a22a5c5d349ee483334d1dd375a3d4fd3bbecb Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Fri, 9 Feb 2024 11:30:01 +0200 Subject: [PATCH 2/3] Pass token explicitly to codecov action This is a requirement for the v4 version of the action to work. --- .github/workflows/qa.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index eef70b872..7e46fafc6 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -78,6 +78,7 @@ jobs: uses: codecov/codecov-action@v4 with: file: /tmp/coverage.combined.out + token: ${{ secrets.CODECOV_TOKEN }} adwatchd-tests: name: Windows tests for adwatchd From 5fdfffe417db85fc6fa806c19e19e924bf77c6e4 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Fri, 9 Feb 2024 11:34:15 +0200 Subject: [PATCH 3/3] Align coverage reporting with Pro for WSL project See https://github.com/ubuntu/authd/pull/202 --- .github/workflows/qa.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 7e46fafc6..81c3b5cf5 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -68,7 +68,9 @@ jobs: sudo -E $(which go) test -coverpkg=./... -coverprofile=/tmp/coverage.sudo.out -covermode=set $SUDO_PACKAGES # Combine coverage files, and filter out test utilities and generated files - grep -hv -e "testutils" -e "pb.go:" -e "/e2e/" /tmp/coverage.out /tmp/coverage.sudo.out > /tmp/coverage.combined.out + cod_cov_dir="$(pwd)/coverage/codecov" + mkdir -p "${cod_cov_dir}" + grep -hv -e "testutils" -e "pb.go:" -e "/e2e/" /tmp/coverage.out /tmp/coverage.sudo.out > "${cod_cov_dir}/coverage.combined.out" - name: Run tests (with race detector) run: | go test -race ./... @@ -77,7 +79,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: - file: /tmp/coverage.combined.out + directory: ./coverage/codecov token: ${{ secrets.CODECOV_TOKEN }} adwatchd-tests: