chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
e2e runs its public and private flows side by side
.knotless/workflows/e2e.yml+15−6
| @@ -2,7 +2,7 @@ | ||
# logging in through the PDS's own approval page, then every write the | ||
# pages make, each read back on the page and from the PDS | ||
# (harness/e2e/flows.spec.mjs), over a world seeded for the run as the | ||
# shots' is. Then a private repository's, over another on the spaces | ||
# shots' is. Beside it, a private repository's, over another on the spaces | ||
# alpha, each read back on the page and from its space, and as not there | ||
# to anyone else (private.spec.mjs). The shots show what the pages draw; | ||
# this, that what they do lands. Each flow that fails leaves the page as | ||
| @@ -86,15 +86,24 @@ steps: | ||
- name: build | ||
run: | | ||
export PATH=/opt/node/bin:$PATH | ||
cargo build --bins -p knotless -p knotless-serve | ||
cd web && npm run build | ||
# The binaries and the pages side by side, as neither needs the other. | ||
cargo build --bins -p knotless -p knotless-serve & cargo=$! | ||
(cd web && npm run build) || { kill $cargo; exit 1; } | ||
wait $cargo | ||
- name: flows | ||
run: | | ||
export PATH=/opt/node/bin:$PATH | ||
status=0 | ||
(cd harness && E2E=1 npx playwright test -c e2e/playwright.config.mjs) || status=$? | ||
# Then the private ones, over a world of their own on the alpha. | ||
(cd harness && KNOTLESS_DEV_ENV=/opt/atproto/packages/dev-env E2E=1 npx playwright test -c e2e/playwright.config.mjs) || status=$? | ||
# The public flows over the stock PDS, and the private ones over a | ||
# world of their own on the alpha, side by side: they share nothing | ||
# but ports, which SHOTS_PORT sets apart. Each one's log is shown | ||
# whole once it ends. | ||
(cd harness && SHOTS_PORT=29100 E2E=1 npx playwright test -c e2e/playwright.config.mjs) > /tmp/e2e-public.log 2>&1 & public=$! | ||
(cd harness && SHOTS_PORT=29200 KNOTLESS_DEV_ENV=/opt/atproto/packages/dev-env E2E=1 npx playwright test -c e2e/playwright.config.mjs) > /tmp/e2e-private.log 2>&1 & private=$! | ||
wait $public || status=$? | ||
echo "==> public flows"; cat /tmp/e2e-public.log | ||
wait $private || status=$? | ||
echo "==> private flows"; cat /tmp/e2e-private.log | ||
# The page each failed flow ended on, named for the flow. | ||
if [ -n "${KNOTLESS_RUN_OUTPUTS:-}" ] && [ -d target/e2e ]; then | ||
for shot in target/e2e/*/*/test-failed-*.png; do | ||
AGENTS.md+1−1
| @@ -224,7 +224,7 @@ on every pull. `main` deploys only once they all pass: | ||
write the pages make, from starring and commenting to merging, | ||
settings, organizations, transfers and deleting an account's data, | ||
as two accounts, each read back on the page and from the PDS | ||
(`harness/e2e/flows.spec.mjs`); then a private repository's, over | ||
(`harness/e2e/flows.spec.mjs`); and beside it a private repository's, over | ||
the spaces alpha, each read back from its space and as not there to | ||
anyone else (`private.spec.mjs`, `just e2e-private`). A flow that | ||
fails leaves its page among the check's outputs. A new control that | ||