Skip to content

Commit

Permalink
test warning count step
Browse files Browse the repository at this point in the history
  • Loading branch information
Umang01-hash committed Jan 8, 2025
1 parent 44e3eeb commit bff3618
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ jobs:
grep -v '/mock_' package.cov > profile.cov
go tool cover -func profile.cov
- name: Count Warnings
id: count-warnings
run: |
warning_count=$(go test gofr.dev/pkg/... -v | grep -c "WARNING")
echo "Warnings found: $warning_count"
echo "warning_count=$warning_count" >> $GITHUB_ENV
- name: Fail if too many warnings
run: |
if [ ${{ env.warning_count }} -gt 10 ]; then
echo "Too many warnings: ${{ env.warning_count }}"
exit 1
fi
- name: Upload Test Coverage
if: ${{ matrix.go-version == '1.22'}}
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit bff3618

Please sign in to comment.