Skip to content

Commit

Permalink
Fix pr coverage report (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkouv authored Aug 30, 2024
1 parent 60149c9 commit 0950bef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ccip-ocr3-build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ jobs:
- name: Generate coverage report
if: github.event_name == 'pull_request'
run: |
go tool cover -func=coverage.out > coverage.txt
total=$(go tool cover -func=coverage.out | grep total | awk '{print $3}')
echo "coverage=$total" >> $GITHUB_ENV
- name: Coverage on target branch
if: github.event_name == 'pull_request'
run: |
git fetch origin ${{ github.base_ref }}
git checkout ${{ github.base_ref }}
go test -coverprofile=coverage_target.out ./...
go tool cover -func=coverage_target.out > coverage_target.txt
TEST_COUNT=1 COVERAGE_FILE=coverage_target.out make test
total=$(go tool cover -func=coverage_target.out | grep total | awk '{print $3}')
echo "coverage_target=$total" >> $GITHUB_ENV
- name: Remove previous coverage comments
Expand Down

0 comments on commit 0950bef

Please sign in to comment.