Skip to content

Commit c0329dd

Browse files
authored
Merge pull request #469 from Disper/workflows_should_fail_on_error
failing tests will fail github workflows
2 parents 27f35cd + 33e7ac4 commit c0329dd

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.github/workflows/acm.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ jobs:
6060
with:
6161
go-version-file: go.mod
6262
- name: Run unit tests
63-
run: make test | tee test.log
63+
run: |
64+
set -o pipefail
65+
make test | tee test.log
6466
- name: Archive test results
6567
uses: actions/upload-artifact@v4
6668
if: success() || failure()

.github/workflows/cra.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
- name: Run unit tests
8484
working-directory: ./components/compass-runtime-agent
8585
run: |
86+
set -o pipefail
8687
touch test.log
8788
make test | tee -a test.log
8889
- name: Archive test results

.github/workflows/gateway.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ jobs:
7676
cache-dependency-path: components/central-application-gateway/go.sum
7777
- name: Run unit tests
7878
working-directory: ./components/central-application-gateway
79-
run: go test ./... | tee test.log
79+
run: |
80+
set -o pipefail
81+
go test ./... | tee test.log
8082
- name: Archive test results
8183
if: success() || failure()
8284
uses: actions/upload-artifact@v4
@@ -116,7 +118,9 @@ jobs:
116118
DEFAULT_K3D_VERSION: v5.6.0
117119
run: curl --silent --fail $K3D_URL | TAG=$DEFAULT_K3D_VERSION bash
118120
- name: Run unit tests
119-
run: make -C tests/hack/ci k3d-gateway-tests
121+
run: |
122+
set -o pipefail
123+
make -C tests/hack/ci k3d-gateway-tests
120124
- name: Archive test results
121125
if: success() || failure()
122126
uses: actions/upload-artifact@v4

.github/workflows/validator.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ jobs:
7676
cache-dependency-path: components/central-application-connectivity-validator/go.sum
7777
- name: Run unit tests
7878
working-directory: ./components/central-application-connectivity-validator
79-
run: make test | tee test.log
79+
run: |
80+
set -o pipefail
81+
make test | tee test.log
8082
- name: Archive test results
8183
if: success() || failure()
8284
uses: actions/upload-artifact@v4
@@ -115,7 +117,9 @@ jobs:
115117
- name: Install yq
116118
run: sudo go install github.com/mikefarah/yq/v4@latest
117119
- name: Run unit tests
118-
run: make -C tests/hack/ci k3d-validator-tests
120+
run: |
121+
set -o pipefail
122+
make -C tests/hack/ci k3d-validator-tests
119123
- name: Archive test results
120124
if: always()
121125
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)