forked from Synthetixio/synpress
-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (81 loc) · 3.08 KB
/
e2e_debug.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: E2E (debug)
on: [push, pull_request]
concurrency:
group:
'${{ github.workflow }} @ ${{ github.event.pull_request.head.label ||
github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v2
- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # pin@v2.4.0
with:
version: 8.15.3
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # pin@v3.8.1
with:
node-version: 18.16
- name: Run anvil
run: |
docker-compose -f docker-compose.yml --profile synpress up --build --detach
- name: Set pnpm cache directory
run: pnpm config set store-dir .pnpm-store
continue-on-error: true
- name: Setup cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v2
with:
path: |
.pnpm-store
node_modules
/home/runner/.cache/Cypress
key: ${{ runner.os }}-pnpm-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-v1-
continue-on-error: true
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
# warning: your env vars could be printed out in console by anyone with access to exposed ngrok vnc
- name: Install linux deps
run: |
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
fluxbox \
novnc \
x11vnc \
xvfb \
net-tools \
jq \
ngrok
- name: Run e2e tests (debug)
run: |
Xvfb :0 -screen 0 1024x768x24 -listen tcp -ac &
fluxbox &
x11vnc -forever -shared &
websockify --web /usr/share/novnc 8080 localhost:5900 &
# ngrok http 8080 --authtoken ${NGROK_AUTH} --basic-auth ${NGROK_BASIC_AUTH} &
echo -n "======> remote noVNC URL: "
sleep 5
curl -s localhost:4040/api/tunnels | jq -r .tunnels[0].public_url
pnpm test:e2e:keplr
env:
NGROK_AUTH: ${{ secrets.NGROK_AUTH }}
NGROK_BASIC_AUTH: ${{ secrets.NGROK_BASIC_AUTH }}
CYPRESS_PRIVATE_KEY_WITH_FUNDS:
${{ secrets.CYPRESS_PRIVATE_KEY_WITH_FUNDS }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
DISPLAY: :0.0
- name: Archive e2e artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v2
if: always()
with:
name: e2e-artifacts
path: |
tests/e2e/videos
tests/e2e/screenshots
continue-on-error: true