@@ -220,6 +220,53 @@ jobs:
220220 with :
221221 base-branch-name : ' ${{ github.base_ref }}'
222222
223+ e2e-tests :
224+ name : ' E2E tests'
225+ if : github.event.pull_request.head.repo.full_name == github.repository
226+ runs-on : ubuntu-latest
227+ timeout-minutes : 15
228+ continue-on-error : true
229+ steps :
230+ - uses : actions/checkout@v3
231+ with :
232+ repository : ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
233+ ref : ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
234+ fetch-depth : 1
235+ - name : Setup deps
236+ uses : ./.github/actions/setup-cli-deps
237+ with :
238+ node-version : ${{ env.DEFAULT_NODE_VERSION }}
239+ - name : Build
240+ run : pnpm nx run-many --all --skip-nx-cache --target=build --output-style=stream
241+ - name : Install Playwright Chromium
242+ run : npx playwright install chromium
243+ working-directory : packages/e2e
244+ - name : Rebuild node-pty
245+ run : pnpm rebuild node-pty
246+ - name : Run E2E tests
247+ working-directory : packages/e2e
248+ env :
249+ SHOPIFY_FLAG_CLIENT_ID : ${{ secrets.E2E_CLIENT_ID }}
250+ E2E_ACCOUNT_EMAIL : ${{ secrets.E2E_ACCOUNT_EMAIL }}
251+ E2E_ACCOUNT_PASSWORD : ${{ secrets.E2E_ACCOUNT_PASSWORD }}
252+ E2E_STORE_FQDN : ${{ secrets.E2E_STORE_FQDN }}
253+ E2E_SECONDARY_CLIENT_ID : ${{ secrets.E2E_SECONDARY_CLIENT_ID }}
254+ run : npx playwright test
255+ - name : Upload Playwright report
256+ uses : actions/upload-artifact@v4
257+ if : ${{ !cancelled() }}
258+ with :
259+ name : playwright-report
260+ path : packages/e2e/playwright-report/
261+ retention-days : 14
262+ - name : Upload test results
263+ uses : actions/upload-artifact@v4
264+ if : ${{ !cancelled() }}
265+ with :
266+ name : playwright-results
267+ path : packages/e2e/test-results/
268+ retention-days : 14
269+
223270 type-diff :
224271 if : github.event.pull_request.head.repo.full_name == github.repository
225272 name : ' Type-diff'
0 commit comments