Skip to content

Delivery-contract probes evaluate deltas from post-time baseline #1703

Delivery-contract probes evaluate deltas from post-time baseline

Delivery-contract probes evaluate deltas from post-time baseline #1703

Workflow file for this run

name: CI
on:
pull_request:
branches: [nightly, master]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
ci:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
- name: Type-check (server + frontend)
run: npm run check
- run: npm run build
- name: Lint changed files
run: |
git diff -z --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- '*.ts' '*.tsx' '*.js' '*.mjs' '*.cjs' | xargs -0 --no-run-if-empty npx eslint
- run: npm test
e2e:
needs: ci
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect e2e-relevant changes
id: changes
shell: bash
run: |
set -euo pipefail
git fetch --no-tags --prune origin "${{ github.base_ref }}"
changed_files="$(git diff --name-only "origin/${{ github.base_ref }}...HEAD")"
if [ -z "$changed_files" ]; then
echo "e2e_required=true" >> "$GITHUB_OUTPUT"
echo "No changed files detected; running e2e conservatively."
elif printf '%s\n' "$changed_files" | grep -Ev '^(docs/|.*\.mdx?$)' >/dev/null; then
echo "e2e_required=true" >> "$GITHUB_OUTPUT"
echo "E2E-relevant changes detected:"
printf '%s\n' "$changed_files"
else
echo "e2e_required=false" >> "$GITHUB_OUTPUT"
echo "Docs/markdown-only changes detected; e2e check will no-op successfully."
printf '%s\n' "$changed_files"
fi
- uses: actions/setup-node@v4
if: steps.changes.outputs.e2e_required == 'true'
with:
node-version-file: '.nvmrc'
cache: npm
- run: npm ci
if: steps.changes.outputs.e2e_required == 'true'
- run: npm run build
if: steps.changes.outputs.e2e_required == 'true'
env:
RELAY_IDE_E2E_FIXTURES: '1'
- name: Verify hosted Chrome
if: steps.changes.outputs.e2e_required == 'true'
run: google-chrome --version
- name: Run e2e smoke tests
if: steps.changes.outputs.e2e_required == 'true'
run: npx playwright test --grep "smoke"
env:
CI: true
RELAY_IDE_DEV_INSTANCE: '1'
# No RELAY_IDE_PORT here: the harness owns the fixture port (#1214).
# 3456 is the installed hub's default and the exact value this lane
# moved away from; leaving it set only worked because
# `lazyE2eWebServerEnv` re-set it, and it would come back to life the
# moment the server started outside `webServer`. Use PLAYWRIGHT_PORT
# if a run ever needs a pinned port.
RELAY_IDE_E2E_SKIP_BUILD: '1'
PLAYWRIGHT_CHROME_CHANNEL: chrome
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 7