6
6
- main
7
7
pull_request :
8
8
9
+ concurrency :
10
+ group : ci-${{ github.head_ref || github.ref }}
11
+ cancel-in-progress : true
12
+
9
13
env :
10
14
NODE_VERSION : 20
11
15
PERCY_PARALLEL_NONCE : ${{ github.run_id }}-${{ github.run_number }}
@@ -17,42 +21,28 @@ jobs:
17
21
runs-on : ubuntu-latest
18
22
timeout-minutes : 3
19
23
steps :
20
- - name : Check out a copy of the repo
21
- uses : actions/checkout@v2
22
-
23
- - uses : mansona/npm-lockfile-version@v1
24
-
25
- - name : Use Node.js ${{ env.NODE_VERSION }}
26
- uses : actions/setup-node@v2
24
+ - uses : actions/checkout@v4
25
+ - uses : pnpm/action-setup@v4
26
+ - uses : actions/setup-node@v4
27
27
with :
28
- cache : ' npm '
28
+ cache : ' pnpm '
29
29
node-version : ${{ env.NODE_VERSION }}
30
-
31
- - name : Install dependencies
32
- run : npm ci
33
-
34
- - name : Lint
35
- run : npm run lint
30
+ - run : pnpm i --frozen-lockfile
31
+ - run : pnpm run lint
36
32
37
33
test-app :
38
34
name : Test app
39
35
runs-on : ubuntu-latest
40
36
timeout-minutes : 5
41
37
steps :
42
- - name : Check out a copy of the repo
43
- uses : actions/checkout@v2
44
-
45
- - name : Use Node.js ${{ env.NODE_VERSION }}
46
- uses : actions/setup-node@v2
38
+ - uses : actions/checkout@v4
39
+ - uses : pnpm/action-setup@v4
40
+ - uses : actions/setup-node@v4
47
41
with :
48
- cache : ' npm '
42
+ cache : ' pnpm '
49
43
node-version : ${{ env.NODE_VERSION }}
50
-
51
- - name : Install dependencies
52
- run : npm ci
53
-
54
- - name : Test
55
- run : npx percy exec -- npm run test
44
+ - run : pnpm i --frozen-lockfile
45
+ - run : pnpm percy exec -- npm run test
56
46
env :
57
47
PERCY_PARALLEL_NONCE : ${{ env.PERCY_PARALLEL_NONCE }}
58
48
PERCY_PARALLEL_TOTAL : ${{ env.PERCY_PARALLEL_TOTAL }}
@@ -63,25 +53,20 @@ jobs:
63
53
runs-on : ubuntu-latest
64
54
timeout-minutes : 5
65
55
steps :
66
- - name : Check out a copy of the repo
67
- uses : actions/checkout@v2
56
+ - uses : actions/checkout@v4
68
57
with :
69
58
ref : ${{ github.event.pull_request.head.sha }}
70
-
71
- - name : Use Node.js ${{ env.NODE_VERSION }}
72
- uses : actions/setup-node@v2
59
+ - uses : pnpm/action-setup@v4
60
+ - uses : actions/setup-node@v4
73
61
with :
74
- cache : ' npm '
62
+ cache : ' pnpm '
75
63
node-version : ${{ env.NODE_VERSION }}
76
-
77
- - name : Install dependencies
78
- run : npm ci
79
-
64
+ - run : pnpm i --frozen-lockfile
80
65
- name : Build production app
81
- run : npm run build
66
+ run : pnpm run build
82
67
83
68
- name : Run Lighthouse
84
- run :
npx @ lhci/[email protected] autorun
69
+ run : pnpm lhci autorun
85
70
env :
86
71
LHCI_GITHUB_APP_TOKEN : ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
87
72
LHCI_TOKEN : ${{ secrets.LHCI_TOKEN }}
0 commit comments