Skip to content

Commit 2f13148

Browse files
committed
ci(satp-hermes): allow tests jobs to fail
Signed-off-by: Rafael Belchior <[email protected]>
1 parent e895a4c commit 2f13148

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

.github/workflows/satp-hermes-test.yaml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
set -euo pipefail
5151
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
5252
echo "Running unit tests with coverage"
53-
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:unit --coverage --coverageDirectory=./code-coverage-ts/satp-hermes || true
53+
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:unit --coverage --coverageDirectory=./code-coverage-ts/satp-hermes
5454
else
5555
echo "Running unit tests without coverage"
5656
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:unit
@@ -80,22 +80,7 @@ jobs:
8080
path: packages/cactus-plugin-satp-hermes/reports/junit/satp-hermes-tests-unit.xml
8181
reporter: jest-junit
8282
list-tests: failed
83-
fail-on-error: false # Don't fail the job, just report results
84-
85-
- name: Set job outcome based on test results
86-
if: always() && steps.check_unit_junit.outputs.found == 'true'
87-
run: |
88-
if grep -q 'failures="[1-9]' packages/cactus-plugin-satp-hermes/reports/junit/satp-hermes-tests-unit.xml 2>/dev/null; then
89-
echo "❌ Unit tests failed - check test results above"
90-
echo "::warning::SATP Unit tests have failures"
91-
exit 1
92-
elif grep -q 'errors="[1-9]' packages/cactus-plugin-satp-hermes/reports/junit/satp-hermes-tests-unit.xml 2>/dev/null; then
93-
echo "❌ Unit tests had errors - check test results above"
94-
echo "::warning::SATP Unit tests have errors"
95-
exit 1
96-
else
97-
echo "✅ Unit tests passed successfully"
98-
fi
83+
fail-on-error: false
9984

10085
- name: Check for SATP unit coverage artifacts
10186
id: check_unit_coverage
@@ -155,7 +140,7 @@ jobs:
155140
set -euo pipefail
156141
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
157142
echo "Running integration bridge tests with coverage"
158-
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:bridge --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-bridge || true
143+
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:bridge --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-bridge
159144
else
160145
echo "Running integration bridge tests without coverage"
161146
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:bridge
@@ -245,7 +230,7 @@ jobs:
245230
set -euo pipefail
246231
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
247232
echo "Running integration oracle tests with coverage"
248-
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:oracle --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-oracle || true
233+
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:oracle --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-oracle
249234
else
250235
echo "Running integration oracle tests without coverage"
251236
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:oracle
@@ -337,7 +322,7 @@ jobs:
337322
set -euo pipefail
338323
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
339324
echo "Running integration gateway tests with coverage"
340-
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:gateway --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-gateway || true
325+
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:gateway --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-gateway
341326
else
342327
echo "Running integration gateway tests without coverage"
343328
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:gateway
@@ -428,7 +413,7 @@ jobs:
428413
set -euo pipefail
429414
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
430415
echo "Running integration docker tests with coverage"
431-
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:docker --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-docker || true
416+
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:docker --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-integration-docker
432417
else
433418
echo "Running integration docker tests without coverage"
434419
yarn workspace @hyperledger/cactus-plugin-satp-hermes test:integration:docker
@@ -531,7 +516,7 @@ jobs:
531516
set -euo pipefail
532517
if [ "${{ env.RUN_CODE_COVERAGE }}" = "true" ]; then
533518
echo "Running CBDC integration tests with coverage"
534-
yarn workspace @hyperledger/cactus-example-cbdc-bridging-backend test:integration --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-cbdc || true
519+
yarn workspace @hyperledger/cactus-example-cbdc-bridging-backend test:integration --coverage --coverageDirectory=./code-coverage-ts/satp-hermes-cbdc
535520
else
536521
echo "Running CBDC integration tests without coverage"
537522
yarn workspace @hyperledger/cactus-example-cbdc-bridging-backend test:integration

0 commit comments

Comments
 (0)