diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c0975700..42dcb7695 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,8 +84,18 @@ jobs: test: runs-on: ubuntu-latest needs: [test-isolated, test-shared] + if: ${{ always() }} steps: - - run: echo "All test shards passed" + - name: Verify test shards passed + env: + ISOLATED_RESULT: ${{ needs.test-isolated.result }} + SHARED_RESULT: ${{ needs.test-shared.result }} + run: | + if [ "$ISOLATED_RESULT" != "success" ] || [ "$SHARED_RESULT" != "success" ]; then + echo "::error::test-isolated=${ISOLATED_RESULT}, test-shared=${SHARED_RESULT}" + exit 1 + fi + echo "All test shards passed" typecheck: runs-on: ubuntu-latest diff --git a/script/publish-workflow.test.ts b/script/publish-workflow.test.ts index 70e97a40b..c22921d4b 100644 --- a/script/publish-workflow.test.ts +++ b/script/publish-workflow.test.ts @@ -9,6 +9,10 @@ const workflowChecks = [ testRuns: [ "run: bun run script/run-ci-tests.ts --phase=isolated --shard-count=4 --shard-index=${{ matrix.shard }}", "run: bun run script/run-ci-tests.ts --phase=shared", + "if: ${{ always() }}", + "ISOLATED_RESULT: ${{ needs.test-isolated.result }}", + "SHARED_RESULT: ${{ needs.test-shared.result }}", + "echo \"::error::test-isolated=${ISOLATED_RESULT}, test-shared=${SHARED_RESULT}\"", "run: bun test src/shared/dist-bundle-bun-globals.test.ts", ], },