This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
63 lines (53 loc) · 1.77 KB
/
playwright-e2e.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
55
56
57
58
59
60
61
62
63
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
e2e_test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
- name: Install
run: yarn install --immutable --immutable-cache --check-cache
- name: Install
run: yarn install --immutable --immutable-cache --check-cache
working-directory: test
# Start zombienet in background
- name: Download polkadot
working-directory: test
run: |
curl -L https://github.com/paritytech/polkadot/releases/latest/download/polkadot -o "${GITHUB_WORKSPACE}/polkadot"
chmod 777 "${GITHUB_WORKSPACE}/polkadot"
echo PATH=$PATH:"${GITHUB_WORKSPACE}" >> $GITHUB_ENV
- name: Display polkadot version
run: polkadot --version
- name: Background Zombienet Server
uses: BerniWittmann/background-server-action@v1
with:
start: cd test; yarn zombienet:native
wait-on: "http://127.0.0.1:9996/metrics"
# Start the web app in background
- name: Background App Server
uses: BerniWittmann/background-server-action@v1
with:
start: yarn dev
wait-on: "http://localhost:1234"
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
working-directory: test
- name: Run Playwright tests
run: yarn test:e2e
working-directory: test
env:
URL: http://127.0.0.1:1234/?rpc=ws://127.0.0.1:9984
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30