diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0082562b2..fa9bab23a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,13 +15,34 @@ concurrency: cancel-in-progress: true jobs: + # hashFiles() is NOT valid in a job-level `if:` (only step-level) — using it there + # made GitHub reject the whole workflow ("workflow file issue"). Detect package + # presence once here and gate the backend jobs on this output instead. + detect-packages: + name: Detect packages + runs-on: ubuntu-latest + outputs: + has_packages: ${{ steps.check.outputs.has_packages }} + steps: + - name: Checkout code + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + - name: Check for packages/* + id: check + run: | + if [ -f packages/shared/package.json ]; then + echo "has_packages=true" >> "$GITHUB_OUTPUT" + else + echo "has_packages=false" >> "$GITHUB_OUTPUT" + fi + unit-tests: name: Unit Tests runs-on: ubuntu-latest timeout-minutes: 15 # Skip when packages/* workspaces are absent (e.g. waitlist-only forks). # When packages/ is restored from upstream, the guard evaluates true and the job runs. - if: hashFiles('packages/shared/package.json') != '' + needs: detect-packages + if: needs.detect-packages.outputs.has_packages == 'true' env: HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} @@ -83,7 +104,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 20 # Skip when packages/* workspaces are absent (e.g. waitlist-only forks). - if: hashFiles('packages/shared/package.json') != '' + needs: detect-packages + if: needs.detect-packages.outputs.has_packages == 'true' env: RPC_URL: ${{ secrets.DEVNET_RPC_URL || 'https://api.devnet.solana.com' }} @@ -220,7 +242,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 # Skip when packages/* workspaces are absent (e.g. waitlist-only forks). - if: hashFiles('packages/shared/package.json') != '' + needs: detect-packages + if: needs.detect-packages.outputs.has_packages == 'true' steps: - name: Checkout code diff --git a/e2e/helpers.ts b/e2e/helpers.ts index 68bd11b5c..4c8f85013 100644 --- a/e2e/helpers.ts +++ b/e2e/helpers.ts @@ -90,6 +90,12 @@ export function collectConsoleErrors(page: Page): string[] { // Sentry DSN / monitoring not configured in CI if (text.includes("Sentry")) return; if (text.includes("sentry")) return; + // Vercel / Cloudflare analytics are only wired up on a real deployment. + // Against localhost the RUM beacon is refused by CORS and the insights + // script 404s to an HTML error page, failing strict MIME checking. + if (text.includes("cloudflareinsights.com")) return; + if (text.includes("cdn-cgi/rum")) return; + if (text.includes("_vercel/insights")) return; errors.push(text); } });