Skip to content

Commit 2c3d1c5

Browse files
Test
1 parent d6910ab commit 2c3d1c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
go-version: 1.24.2
2424
- name: Run tests and calculate coverage
2525
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 '%')
26+
POSTGRES_CONTAINER=1 VERNEMQ_CONTAINER=1 go test -v -coverpkg=./... -coverprofile=profile.cov ./...
27+
CURRENT_COVERAGE=$(go tool cover -func profile.cov | grep total | awk '{print $3}' | tr -d '%')
2828
echo "CURRENT_COVERAGE=$CURRENT_COVERAGE" >> $GITHUB_ENV
2929
if [ -f previous_coverage.txt ]; then
3030
PREVIOUS_COVERAGE=$(cat previous_coverage.txt)

0 commit comments

Comments
 (0)