67
67
strategy :
68
68
matrix :
69
69
os : [ubuntu-latest, windows-latest, macos-latest]
70
- node-version : [12.x, 14.x, 16.x, 18.x, 20.x]
70
+ node-version : [12.x, 14.x, 16.x, 18.x, 20.x, 22.x ]
71
71
webpack-version : [latest]
72
72
73
73
runs-on : ${{ matrix.os }}
@@ -82,11 +82,21 @@ jobs:
82
82
run : git config --global core.autocrlf input
83
83
84
84
- uses : actions/checkout@v4
85
-
85
+ - uses : actions/github-script@v7
86
+ id : calculate_architecture
87
+ with :
88
+ result-encoding : string
89
+ script : |
90
+ if ('${{ matrix.os }}' === 'macos-latest' && ('${{ matrix['node-version'] }}' === '12.x' || '${{ matrix['node-version'] }}' === '14.x')) {
91
+ return "x64"
92
+ } else {
93
+ return ''
94
+ }
86
95
- name : Use Node.js ${{ matrix.node-version }}
87
96
uses : actions/setup-node@v4
88
97
with :
89
98
node-version : ${{ matrix.node-version }}
99
+ architecture : ${{ steps.calculate_architecture.outputs.result }}
90
100
cache : " npm"
91
101
92
102
- name : Install dependencies
@@ -110,7 +120,7 @@ jobs:
110
120
strategy :
111
121
matrix :
112
122
os : [ubuntu-latest, windows-latest, macos-latest]
113
- node-version : [12.x, 14.x, 16.x, 18.x, 20.x]
123
+ node-version : [12.x, 14.x, 16.x, 18.x, 20.x, 22.x ]
114
124
115
125
runs-on : ${{ matrix.os }}
116
126
@@ -120,11 +130,21 @@ jobs:
120
130
run : git config --global core.autocrlf input
121
131
122
132
- uses : actions/checkout@v4
123
-
133
+ - uses : actions/github-script@v7
134
+ id : calculate_architecture
135
+ with :
136
+ result-encoding : string
137
+ script : |
138
+ if ('${{ matrix.os }}' === 'macos-latest' && ('${{ matrix['node-version'] }}' === '12.x' || '${{ matrix['node-version'] }}' === '14.x')) {
139
+ return "x64"
140
+ } else {
141
+ return ''
142
+ }
124
143
- name : Use Node.js ${{ matrix.node-version }}
125
144
uses : actions/setup-node@v4
126
145
with :
127
146
node-version : ${{ matrix.node-version }}
147
+ architecture : ${{ steps.calculate_architecture.outputs.result }}
128
148
cache : " npm"
129
149
130
150
- name : Install dependencies
0 commit comments