Skip to content

Commit

Permalink
like for test target, instead of hardcoding make dependencies, check …
Browse files Browse the repository at this point in the history
…for make coverage, will allow to cover build tags in fortio/log
  • Loading branch information
ldemailly committed Jun 30, 2024
1 parent cde414c commit 640a0fb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ jobs:
with:
go-version: '1.22'
check-latest: true
- name: Optional init
run: make dependencies || true # Used in fortio for instance to prep for go tests
- name: Run test coverage
run: go test -coverprofile=coverage.out ./...
run: |
if make -n coverage &>/dev/null; then
echo "Running coverage through make"
make coverage
else
echo "No Makefile coverage target, using default behavior"
go test -coverprofile=coverage.out ./...
fi
- uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # pin@v3
with:
files: coverage.out

0 comments on commit 640a0fb

Please sign in to comment.