From 176bfcf6c770375bfed1a5d7170f1744b77feb54 Mon Sep 17 00:00:00 2001 From: sergerad Date: Tue, 2 Apr 2024 12:47:19 +1300 Subject: [PATCH] Fix coverage call and check total --- .github/workflows/main.yaml | 1 + .github/workflows/pr.yaml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 879d79b..6367276 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -30,6 +30,7 @@ jobs: run: ./.github/workflows/scripts/examples.sh - name: Run Test + shell: bash run: | go test -v . -covermode=count -coverprofile=coverage.out go tool cover -func=coverage.out -o=coverage.ougo tool cover -func=coverage.out -o=coverage.outt diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 3731ccb..5609dbb 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,6 +9,7 @@ jobs: test: runs-on: ubuntu-latest steps: + - uses: ./.github/actions/bootstrap - name: Checkout uses: actions/checkout@v4 with: @@ -30,6 +31,8 @@ jobs: run: ./.github/workflows/scripts/examples.sh - name: Run Test + shell: bash run: | go test -v . -covermode=count -coverprofile=coverage.out - go tool cover -func=coverage.out -o=coverage.ougo tool cover -func=coverage.out -o=coverage.outt + go tool cover -func=coverage.out -o=coverage.out + grep total < coverage.out | grep '100.0%'