From 3a02507dfa42484549b64379b1706363eee7d367 Mon Sep 17 00:00:00 2001 From: Henrique Vicente Date: Thu, 19 Sep 2024 19:17:24 +0200 Subject: [PATCH] cover: remove example directory from code coverage Remove example directory from code coverage explicitly since after #26 it started being considered on the code coverage report and we don't want that. --- .github/workflows/go.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6c03a47..545c47a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -28,8 +28,12 @@ jobs: - name: Test # TODO(henvic): Skip generating code coverage when not sending it to Coveralls to speed up testing. + # Remove example directory from code coverage explicitly since after #26 it + # started being considered on the code coverage report and we don't want that. continue-on-error: ${{ matrix.os != 'ubuntu-latest' || matrix.go != '1.23.x' }} - run: go test -race -covermode atomic -coverprofile=profile.cov ./... + run: | + go test -race -covermode atomic -coverprofile=profile.cov ./... + sed -i '/^github\.com\/henvic\/httpretty\/example\//d' profile.cov - name: Code coverage if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.23.x' }}