-
Notifications
You must be signed in to change notification settings - Fork 87
103 lines (82 loc) · 2.79 KB
/
pr-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
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
95
96
97
98
99
100
101
102
103
name: Tests
on:
pull_request:
branches: [main, master, release]
types: [opened, synchronize, reopened]
push:
branches:
- release
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests-e2e:
name: E2E Tests
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create .env file graphql
run: cp packages/graphql/.env.example packages/graphql/.env
- name: Create .env file explorer
run: cp packages/app-explorer/.env.example packages/app-explorer/.env
- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.15.1
pnpm-version: 9.5.0
- name: Setup Docker
uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start Test Node
run: pnpm node:start
# E2E tests running with Playwright
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
- name: Run E2E Tests
run: xvfb-run --auto-servernum -- pnpm test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: packages/e2e-tests/playwright-report/hard/
retention-days: 30
- name: Stop Test Node
run: pnpm node:stop
tests-e2e-soft:
name: E2E Tests Soft
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create .env file graphql
run: cp packages/graphql/.env.example packages/graphql/.env
- name: Create .env file explorer
run: cp packages/app-explorer/.env.example packages/app-explorer/.env
- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.15.1
pnpm-version: 9.5.0
- name: Setup Docker
uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start Test Node
run: pnpm node:start
# E2E tests running with Playwright
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
- name: Run E2E Tests
run: xvfb-run --auto-servernum -- pnpm test:e2e-soft
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: packages/e2e-tests/playwright-report/soft/
retention-days: 30
- name: Stop Test Node
run: pnpm node:stop