9
9
prepare :
10
10
name : Prepare
11
11
runs-on : ubuntu-latest
12
- outputs :
13
- YARN_CACHE_DIR : ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
14
- YARN_VERSION : ${{ steps.yarn-version.outputs.YARN_VERSION }}
15
12
strategy :
16
13
matrix :
17
- node-version : [16.x, 18.x, 20.x]
14
+ node-version :
15
+ - 18.x
16
+ - 20.x
17
+ - 22.x
18
18
steps :
19
19
- uses : actions/checkout@v3
20
20
- name : Use Node.js ${{ matrix.node-version }}
21
- uses : actions/setup-node@v3
21
+ uses : actions/setup-node@v4
22
22
with :
23
23
node-version : ${{ matrix.node-version }}
24
- - name : Get Yarn cache directory
25
- run : echo "YARN_CACHE_DIR=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
26
- id : yarn-cache-dir
27
- - name : Get Yarn version
28
- run : echo "YARN_VERSION=$(yarn --version)" >> "$GITHUB_OUTPUT"
29
- id : yarn-version
30
- - name : Cache Yarn dependencies
31
- uses : actions/cache@v3
32
- with :
33
- path : ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
34
- key : yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
24
+ cache : ' yarn'
35
25
- name : Install Yarn dependencies
36
26
run : yarn --immutable
37
27
build :
@@ -41,18 +31,17 @@ jobs:
41
31
- prepare
42
32
strategy :
43
33
matrix :
44
- node-version : [16.x, 18.x, 20.x]
34
+ node-version :
35
+ - 18.x
36
+ - 20.x
37
+ - 22.x
45
38
steps :
46
39
- uses : actions/checkout@v3
47
40
- name : Use Node.js ${{ matrix.node-version }}
48
- uses : actions/setup-node@v3
41
+ uses : actions/setup-node@v4
49
42
with :
50
43
node-version : ${{ matrix.node-version }}
51
- - name : Restore Yarn dependencies
52
- uses : actions/cache@v3
53
- with :
54
- path : ${{ needs.prepare.outputs.YARN_CACHE_DIR }}
55
- key : yarn-cache-${{ runner.os }}-${{ needs.prepare.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
44
+ cache : ' yarn'
56
45
- run : yarn --immutable
57
46
- run : yarn build
58
47
- name : Require clean working directory
@@ -67,20 +56,13 @@ jobs:
67
56
runs-on : ubuntu-latest
68
57
needs :
69
58
- prepare
70
- strategy :
71
- matrix :
72
- node-version : [16.x, 18.x, 20.x]
73
59
steps :
74
60
- uses : actions/checkout@v3
75
- - name : Use Node.js ${{ matrix.node-version }}
76
- uses : actions/setup-node@v3
77
- with :
78
- node-version : ${{ matrix.node-version }}
79
- - name : Restore Yarn dependencies
80
- uses : actions/cache@v3
61
+ - name : Set up Node.js
62
+ uses : actions/setup-node@v4
81
63
with :
82
- path : ${{ needs.prepare.outputs.YARN_CACHE_DIR }}
83
- key : yarn-cache-${{ runner.os }}-${{ needs.prepare.outputs.YARN_VERSION }}-${{ hashFiles( 'yarn.lock') }}-${{ matrix.node-version }}
64
+ node-version-file : ' .nvmrc '
65
+ cache : ' yarn'
84
66
- run : yarn --immutable
85
67
- run : yarn lint
86
68
- name : Validate RC changelog
@@ -103,18 +85,17 @@ jobs:
103
85
- prepare
104
86
strategy :
105
87
matrix :
106
- node-version : [16.x, 18.x, 20.x]
88
+ node-version :
89
+ - 18.x
90
+ - 20.x
91
+ - 22.x
107
92
steps :
108
93
- uses : actions/checkout@v3
109
94
- name : Use Node.js ${{ matrix.node-version }}
110
- uses : actions/setup-node@v3
95
+ uses : actions/setup-node@v4
111
96
with :
112
97
node-version : ${{ matrix.node-version }}
113
- - name : Restore Yarn dependencies
114
- uses : actions/cache@v3
115
- with :
116
- path : ${{ needs.prepare.outputs.YARN_CACHE_DIR }}
117
- key : yarn-cache-${{ runner.os }}-${{ needs.prepare.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
98
+ cache : ' yarn'
118
99
- run : yarn --immutable
119
100
- run : yarn test
120
101
- name : Require clean working directory
0 commit comments