From 3f2c1725e9cbe1297d04a42eeba3ad681bc27658 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Fri, 23 Jan 2026 11:14:08 -0800 Subject: [PATCH] Add test coverage reporting to CI - Update CI workflow to generate coverage profile with go test - Upload coverage data to Codecov for tracking - Add CI status and coverage badges to README Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 11 +++++++++-- README.md | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b10db94..25c80de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,15 @@ jobs: - name: Build run: go build -v ./... - - name: Test - run: go test -race -v ./... + - name: Test with coverage + run: go test -race -coverprofile=coverage.out -covermode=atomic ./... + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: ./coverage.out + fail_ci_if_error: false + verbose: true lint: runs-on: ubuntu-latest diff --git a/README.md b/README.md index c285d66..fc37e1d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # gitstreams +[![CI](https://github.com/justinabrahms/gitstreams/actions/workflows/ci.yml/badge.svg)](https://github.com/justinabrahms/gitstreams/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/justinabrahms/gitstreams/graph/badge.svg)](https://codecov.io/gh/justinabrahms/gitstreams) + Track what your GitHub social network has been up to. Get desktop notifications and a rich HTML report showing repos starred, new projects, and activity from developers you follow.