Browse Source

do not hide unit test failure (#1677)

blotus 3 years ago
parent
commit
3adb90e7b7
2 changed files with 3 additions and 1 deletions
  1. 2 1
      .github/workflows/go-tests-windows.yml
  2. 1 0
      .github/workflows/go-tests.yml

+ 2 - 1
.github/workflows/go-tests-windows.yml

@@ -40,7 +40,8 @@ jobs:
     - name: Run tests
       run: |
         go install github.com/kyoh86/richgo@v0.3.10
-        go test -coverprofile coverage.out -covermode=atomic ./... | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter
+        go test -coverprofile coverage.out -covermode=atomic ./... > out.txt
+        cat out.txt | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter
 
     - name: Upload unit coverage to Codecov
       uses: codecov/codecov-action@v2

+ 1 - 0
.github/workflows/go-tests.yml

@@ -76,6 +76,7 @@ jobs:
 
     - name: Run tests
       run: |
+        set -o pipefail
         go install github.com/ory/go-acc@v0.2.8
         go install github.com/kyoh86/richgo@v0.3.10
         go-acc ./... -o coverage.out --ignore database,notifications,protobufs,cwversion,cstest,models \