@@ -11,20 +11,12 @@ jobs:
1111 matrix :
1212 node-version : [18.x, 20.x, 22.x]
1313 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
2316 with :
17+ is-high-risk-environment : false
2418 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' }}
2820
2921 build :
3022 name : Build
@@ -34,20 +26,11 @@ jobs:
3426 matrix :
3527 node-version : [22.x]
3628 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
4631 with :
32+ is-high-risk-environment : false
4733 node-version : ${{ matrix.node-version }}
48- cache : ' yarn'
49- - name : Install dependencies via Yarn
50- run : yarn --immutable --immutable-cache
5134 - run : yarn build
5235 - name : Require clean working directory
5336 shell : bash
@@ -65,20 +48,11 @@ jobs:
6548 matrix :
6649 node-version : [22.x]
6750 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
7753 with :
54+ is-high-risk-environment : false
7855 node-version : ${{ matrix.node-version }}
79- cache : ' yarn'
80- - name : Install dependencies via Yarn
81- run : yarn --immutable --immutable-cache
8256 - run : yarn lint
8357 - name : Validate RC changelog
8458 if : ${{ startsWith(github.head_ref, 'release/') }}
@@ -102,20 +76,11 @@ jobs:
10276 matrix :
10377 node-version : [18.x, 20.x, 22.x]
10478 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
11481 with :
82+ is-high-risk-environment : false
11583 node-version : ${{ matrix.node-version }}
116- cache : ' yarn'
117- - name : Install dependencies via Yarn
118- run : yarn --immutable --immutable-cache
11984 - run : yarn test
12085 - name : Require clean working directory
12186 shell : bash
@@ -133,18 +98,11 @@ jobs:
13398 matrix :
13499 node-version : [18.x, 20.x, 22.x]
135100 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
145103 with :
104+ is-high-risk-environment : false
146105 node-version : ${{ matrix.node-version }}
147- cache : ' yarn'
148106 - name : Install dependencies via Yarn
149107 run : rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
150108 - run : yarn test
0 commit comments