Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '' }}

Expand Down Expand Up @@ -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' }}
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down
Loading