Skip to content

Commit 9b8dc38

Browse files
committed
feat(ci): add codecov workflow for test coverage reporting
Add GitHub Actions workflow to run tests with coverage and upload results to Codecov. The workflow: - Runs on push to main and pull requests - Uses Go 1.23 - Executes make coverage with race detection enabled - Uploads coverage.out to Codecov for tracking Signed-off-by: Alejandro Mery <amery@apptly.co>
1 parent c92d285 commit 9b8dc38

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test and Coverage
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.23'
19+
20+
- name: Run tests with coverage
21+
run: |
22+
export GOTEST_FLAGS="-race -covermode=atomic"
23+
make coverage
24+
25+
- name: Upload coverage to Codecov
26+
uses: codecov/codecov-action@v5
27+
with:
28+
files: ./coverage.out
29+
flags: unittests
30+
name: codecov-core
31+
fail_ci_if_error: true

0 commit comments

Comments
 (0)