We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6910ab commit 2c3d1c5Copy full SHA for 2c3d1c5
.github/workflows/coverage.yaml
@@ -23,8 +23,8 @@ jobs:
23
go-version: 1.24.2
24
- name: Run tests and calculate coverage
25
run: |
26
- POSTGRES_CONTAINER=1 VERNEMQ_CONTAINER=1 go test -cover ./... > coverage.txt
27
- CURRENT_COVERAGE=$(grep -oP '\d+\.\d+%' coverage.txt | tail -1 | tr -d '%')
+ POSTGRES_CONTAINER=1 VERNEMQ_CONTAINER=1 go test -v -coverpkg=./... -coverprofile=profile.cov ./...
+ CURRENT_COVERAGE=$(go tool cover -func profile.cov | grep total | awk '{print $3}' | tr -d '%')
28
echo "CURRENT_COVERAGE=$CURRENT_COVERAGE" >> $GITHUB_ENV
29
if [ -f previous_coverage.txt ]; then
30
PREVIOUS_COVERAGE=$(cat previous_coverage.txt)
0 commit comments