From bf30fb344d8a85960b391b4f622c3855288f0926 Mon Sep 17 00:00:00 2001 From: karolswdev Date: Sat, 30 Aug 2025 18:29:43 -0600 Subject: [PATCH 1/3] chore(ci): align Codecov config with coverage.txt\n\n- Use go test -coverprofile=coverage.txt\n- Upload artifact and Codecov input as coverage.txt\n\nNo Jira ticket; routine CI maintenance change. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d37a9f..f8eb992 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: version: latest args: --timeout=5m - name: Test - run: go test ./... -race -coverprofile=coverage.out + run: go test ./... -race -coverprofile=coverage.txt - name: Govulncheck uses: golang/govulncheck-action@v1 with: @@ -42,12 +42,12 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage - path: coverage.out + path: coverage.txt - name: Upload coverage to Codecov if: success() || failure() uses: codecov/codecov-action@v4 with: - files: coverage.out + files: coverage.txt flags: unittests fail_ci_if_error: false env: From 1684d31b1b9b9bd4659be1295bc3ef6f966042c1 Mon Sep 17 00:00:00 2001 From: karolswdev Date: Sat, 30 Aug 2025 18:36:25 -0600 Subject: [PATCH 2/3] chore(ci): use codecov/codecov-action@v5 with token/slug\n\n- Switch from v4 to v5\n- Pass token via input and set slug\n- Rely on autodiscovery for coverage.txt --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8eb992..9ce0421 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,10 +45,7 @@ jobs: path: coverage.txt - name: Upload coverage to Codecov if: success() || failure() - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: - files: coverage.txt - flags: unittests - fail_ci_if_error: false - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.CODECOV_TOKEN }} + slug: karolswdev/ticketr From 37b34e6c33abc7c92135b35f28291ba9ed7a37a7 Mon Sep 17 00:00:00 2001 From: karolswdev Date: Sat, 30 Aug 2025 18:46:43 -0600 Subject: [PATCH 3/3] chore(ci): ensure coverage.txt is generated at repo root\n\n- Move flags before packages\n- Add -covermode=atomic and -coverpkg=./...\n- Stabilize single coverage.txt for artifact/Codecov --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ce0421..d7b1c9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: version: latest args: --timeout=5m - name: Test - run: go test ./... -race -coverprofile=coverage.txt + run: go test -race -covermode=atomic -coverpkg=./... -coverprofile=coverage.txt ./... - name: Govulncheck uses: golang/govulncheck-action@v1 with: