# The e2e flows (e2e.yml) again, as `just e2e-spaces` runs them: over the # spaces alpha's PDS (harness/spaces), HUD keeping canvases in people's # spaces (HUD_SPACES=on), so what a person does lands there too. Each flow # that fails leaves the page as it was then among the check's outputs, as a # picture. # # Kept between runs as e2e.yml keeps them, the alpha's packages too. image: rust:1.100 runners: [runner.knotless.dev] # As e2e.yml, and the alpha's packages. on: push: {refs: [refs/heads/main]} pull: base: [refs/heads/main, refs/heads/feature/*] paths: [web/**, crates/**, views/**, schemas/**, lexicons/**, Cargo.toml, Cargo.lock, harness/e2e/**, harness/pds.mjs, harness/tls-proxy.mjs, harness/package.json, harness/package-lock.json, harness/spaces/package.json, harness/spaces/package-lock.json, .knotless/workflows/e2e-spaces.yml, .knotless/uses.lock] cache: [target, /usr/local/cargo/registry, /usr/local/rustup, /opt/node, /opt/browsers, /var/cache/apt/archives, web/node_modules, harness/node_modules, harness/spaces/node_modules] env: # The image's toolchain, over the cached rustup's default (check.yml). RUSTUP_TOOLCHAIN: "1.100.0" PLAYWRIGHT_BROWSERS_PATH: /opt/browsers # The alpha's dev-env in place of the harness's (harness/pds.mjs). HUD_DEV_ENV: harness/spaces/node_modules/@atproto/dev-env steps: - uses: chadtmiller.com/steps/node@1 with: {version: 24.22.1} - uses: chadtmiller.com/steps/npm-ci@1 name: pages' packages with: {dir: web} - uses: chadtmiller.com/steps/npm-ci@1 name: harness with: {dir: harness} - uses: chadtmiller.com/steps/npm-ci@1 name: the spaces alpha with: {dir: harness/spaces} - name: chromium run: | cd harness # As e2e.yml installs it. npx playwright install chromium rm -f /etc/apt/apt.conf.d/docker-clean npx playwright install-deps chromium > /tmp/deps.log 2>&1 || { cat /tmp/deps.log; exit 1; } tail -1 /tmp/deps.log - name: build run: | # The pages first: hud-server embeds them. (cd web && npm run build) cargo build -p hud --locked - name: flows run: | status=0 (cd harness && npx playwright test -c e2e/playwright.config.mjs) || status=$? # The page each failed flow ended on, named for the flow. if [ -n "${KNOTLESS_RUN_OUTPUTS:-}" ] && [ -d target/e2e/results ]; then for shot in target/e2e/results/*/test-failed-*.png; do [ -f "$shot" ] && cp "$shot" "$KNOTLESS_RUN_OUTPUTS/$(basename "$(dirname "$shot")").png" done fi exit $status