-
Notifications
You must be signed in to change notification settings - Fork 1.4k
54 lines (52 loc) · 1.69 KB
/
pr_e2e_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: E2E tests
on:
push:
branches:
- feat/e2e-pipeline
jobs:
e2e_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
deployments: write
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install deps
run: npm ci
- name: build
run: npm run build
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: cloudflare-preview-url
id: cloudflare_preview_url
uses: zentered/cloudflare-preview-url@v1.4.0
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
with:
cloudflare_project_id: ${{ secrets.CF_PROJECT_ID}}
wait_until_ready: true
- name: Get URL
run: echo "https://${{ steps.cloudflare_preview_url.outputs.preview_url }}"
- name: Run Playwright tests
working-directory: ./laboratory
run: npx playwright test
env:
LABS_URL: ${{ steps.cloudflare_preview_url.outputs.preview_url }}
WALLET_URL: "https://react-wallet.walletconnect.com/"
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./laboratory/playwright-report/
retention-days: 30