From 430cacbe3ad813cea515eb8bb200943f62db0b3a Mon Sep 17 00:00:00 2001 From: Adam Jones Date: Mon, 17 Nov 2025 17:01:48 +0000 Subject: [PATCH] fix(ci): test failures should fail the build The 'Check if tests exist' step was actually running tests with continue-on-error: true. If tests failed, it would set has-tests=false and skip the actual test step, making CI appear green even with failing tests. Simplified to use 'npm test --if-present' which: - Runs tests if a test script exists (and fails if tests fail) - Does nothing and exits 0 if no test script exists - Removes the need for the complex check logic Fixes the issue where PR #3014 had failing tests but CI was green. --- .github/workflows/typescript.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 87717166f2..c99318bd78 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -41,21 +41,9 @@ jobs: working-directory: src/${{ matrix.package }} run: npm ci - - name: Check if tests exist - id: check-tests - working-directory: src/${{ matrix.package }} - run: | - if npm run test --silent 2>/dev/null; then - echo "has-tests=true" >> $GITHUB_OUTPUT - else - echo "has-tests=false" >> $GITHUB_OUTPUT - fi - continue-on-error: true - - name: Run tests - if: steps.check-tests.outputs.has-tests == 'true' working-directory: src/${{ matrix.package }} - run: npm test + run: npm test --if-present build: needs: [detect-packages, test]