-
Notifications
You must be signed in to change notification settings - Fork 13
116 lines (101 loc) · 2.82 KB
/
ci.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
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on:
push:
branches:
- main
pull_request:
env:
NODE_VERSION: 18
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
PERCY_PARALLEL_TOTAL: 9
PNPM_VERSION: 9
jobs:
build-docs-app:
name: Build (docs-app)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: ${{ env.PNPM_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build docs-app
run: pnpm build:test
working-directory: 'docs-app'
- name: Upload docs-app
uses: actions/upload-artifact@v4
with:
name: dist
path: docs-app/dist
test-docs-app:
name: Test (docs-app)
needs: [build-docs-app]
runs-on: ubuntu-latest
strategy:
matrix:
device:
- 'w1-h1'
- 'w2-h1'
- 'w3-h1'
- 'w1-h2'
- 'w2-h2'
- 'w3-h2'
- 'w1-h3'
- 'w2-h3'
- 'w3-h3'
include:
- device: 'w1-h1'
test-port: 7357
- device: 'w2-h1'
test-port: 7358
- device: 'w3-h1'
test-port: 7359
- device: 'w1-h2'
test-port: 7360
- device: 'w2-h2'
test-port: 7361
- device: 'w3-h2'
test-port: 7362
- device: 'w1-h3'
test-port: 7363
- device: 'w2-h3'
test-port: 7364
- device: 'w3-h3'
test-port: 7365
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: ${{ env.PNPM_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download docs-app
uses: actions/download-artifact@v4
with:
name: dist
path: docs-app/dist
- name: Test (w/ visual regression)
run: npx percy exec -- pnpm test:device --path=dist --test-port=${{ matrix.test-port }}
working-directory: 'docs-app'
env:
DEVICE: ${{ matrix.device }}
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}