@@ -11,20 +11,12 @@ jobs:
11
11
matrix :
12
12
node-version : [18.x, 20.x, 22.x]
13
13
steps :
14
- - uses : actions/checkout@v4
15
- - name : Install Corepack via Node
16
- uses : actions/setup-node@v4
17
- with :
18
- node-version-file : ' .nvmrc'
19
- - name : Install Yarn
20
- run : corepack enable
21
- - name : Install Node.js ${{ matrix.node-version }} and restore Yarn cache
22
- uses : actions/setup-node@v4
14
+ - name : Checkout and setup environment
15
+ uses : MetaMask/action-checkout-and-setup@v1
23
16
with :
17
+ is-high-risk-environment : false
24
18
node-version : ${{ matrix.node-version }}
25
- cache : ' yarn'
26
- - name : Install dependencies via Yarn
27
- run : yarn --immutable
19
+ cache-node-modules : ${{ matrix.node-version == '22.x' }}
28
20
29
21
build :
30
22
name : Build
@@ -34,20 +26,11 @@ jobs:
34
26
matrix :
35
27
node-version : [22.x]
36
28
steps :
37
- - uses : actions/checkout@v4
38
- - name : Install Corepack via Node
39
- uses : actions/setup-node@v4
40
- with :
41
- node-version-file : ' .nvmrc'
42
- - name : Install Yarn
43
- run : corepack enable
44
- - name : Install Node.js ${{ matrix.node-version }} and restore Yarn cache
45
- uses : actions/setup-node@v4
29
+ - name : Checkout and setup environment
30
+ uses : MetaMask/action-checkout-and-setup@v1
46
31
with :
32
+ is-high-risk-environment : false
47
33
node-version : ${{ matrix.node-version }}
48
- cache : ' yarn'
49
- - name : Install dependencies via Yarn
50
- run : yarn --immutable --immutable-cache
51
34
- run : yarn build
52
35
- name : Require clean working directory
53
36
shell : bash
@@ -65,20 +48,11 @@ jobs:
65
48
matrix :
66
49
node-version : [22.x]
67
50
steps :
68
- - uses : actions/checkout@v4
69
- - name : Install Corepack via Node
70
- uses : actions/setup-node@v4
71
- with :
72
- node-version-file : ' .nvmrc'
73
- - name : Install Yarn
74
- run : corepack enable
75
- - name : Install Node.js ${{ matrix.node-version }} and restore Yarn cache
76
- uses : actions/setup-node@v4
51
+ - name : Checkout and setup environment
52
+ uses : MetaMask/action-checkout-and-setup@v1
77
53
with :
54
+ is-high-risk-environment : false
78
55
node-version : ${{ matrix.node-version }}
79
- cache : ' yarn'
80
- - name : Install dependencies via Yarn
81
- run : yarn --immutable --immutable-cache
82
56
- run : yarn lint
83
57
- name : Validate RC changelog
84
58
if : ${{ startsWith(github.head_ref, 'release/') }}
@@ -102,20 +76,11 @@ jobs:
102
76
matrix :
103
77
node-version : [18.x, 20.x, 22.x]
104
78
steps :
105
- - uses : actions/checkout@v4
106
- - name : Install Corepack via Node
107
- uses : actions/setup-node@v4
108
- with :
109
- node-version-file : ' .nvmrc'
110
- - name : Install Yarn
111
- run : corepack enable
112
- - name : Install Node.js ${{ matrix.node-version }} and restore Yarn cache
113
- uses : actions/setup-node@v4
79
+ - name : Checkout and setup environment
80
+ uses : MetaMask/action-checkout-and-setup@v1
114
81
with :
82
+ is-high-risk-environment : false
115
83
node-version : ${{ matrix.node-version }}
116
- cache : ' yarn'
117
- - name : Install dependencies via Yarn
118
- run : yarn --immutable --immutable-cache
119
84
- run : yarn test
120
85
- name : Require clean working directory
121
86
shell : bash
@@ -133,18 +98,11 @@ jobs:
133
98
matrix :
134
99
node-version : [18.x, 20.x, 22.x]
135
100
steps :
136
- - uses : actions/checkout@v4
137
- - name : Install Corepack via Node
138
- uses : actions/setup-node@v4
139
- with :
140
- node-version-file : ' .nvmrc'
141
- - name : Install Yarn
142
- run : corepack enable
143
- - name : Install Node.js ${{ matrix.node-version }} and restore Yarn cache
144
- uses : actions/setup-node@v4
101
+ - name : Checkout and setup environment
102
+ uses : MetaMask/action-checkout-and-setup@v1
145
103
with :
104
+ is-high-risk-environment : false
146
105
node-version : ${{ matrix.node-version }}
147
- cache : ' yarn'
148
106
- name : Install dependencies via Yarn
149
107
run : rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
150
108
- run : yarn test
0 commit comments