CI: avoid pipe in makefile, correctly report error in CI when tests fail (#2621)
so we don't assume bash+pipefail for the makefile
This commit is contained in:
parent
380cbf70a9
commit
1aa4fc5949
5
.github/workflows/go-tests.yml
vendored
5
.github/workflows/go-tests.yml
vendored
|
@ -140,12 +140,13 @@ jobs:
|
||||||
go install github.com/kyoh86/richgo@v0.3.10
|
go install github.com/kyoh86/richgo@v0.3.10
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
make build BUILD_STATIC=1
|
make build BUILD_STATIC=1
|
||||||
make go-acc | richgo testfilter
|
make go-acc | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter
|
||||||
|
|
||||||
- name: Run tests again, dynamic
|
- name: Run tests again, dynamic
|
||||||
run: |
|
run: |
|
||||||
make clean build
|
make clean build
|
||||||
make go-acc | richgo testfilter
|
set -o pipefail
|
||||||
|
make go-acc | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter
|
||||||
|
|
||||||
- name: Upload unit coverage to Codecov
|
- name: Upload unit coverage to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -232,8 +232,7 @@ test: testenv goversion
|
||||||
# run the tests with localstack and coverage
|
# run the tests with localstack and coverage
|
||||||
.PHONY: go-acc
|
.PHONY: go-acc
|
||||||
go-acc: testenv goversion
|
go-acc: testenv goversion
|
||||||
go-acc ./... -o coverage.out --ignore database,notifications,protobufs,cwversion,cstest,models -- $(LD_OPTS) | \
|
go-acc ./... -o coverage.out --ignore database,notifications,protobufs,cwversion,cstest,models -- $(LD_OPTS)
|
||||||
sed 's/ *coverage:.*of statements in.*//'
|
|
||||||
|
|
||||||
# mock AWS services
|
# mock AWS services
|
||||||
.PHONY: localstack
|
.PHONY: localstack
|
||||||
|
|
Loading…
Reference in a new issue