@@ -160,20 +160,36 @@ jobs:
160
160
persist-credentials : false
161
161
162
162
- name : Setup Node.js ${{ matrix.node-version }}
163
+ if : ${{ matrix.node-version != '0.8' }}
163
164
uses : actions/setup-node@v4
164
165
with :
165
166
node-version : ${{ matrix.node-version }}
166
167
168
+ - name : Setup Node.js 0.8
169
+ if : ${{ matrix.node-version == '0.8' }} && matrix.os == 'ubuntu-20.04'
170
+ shell : bash -eo pipefail -l {0}
171
+ run : |
172
+ nvm install --default ${{ matrix.node-version }}
173
+ nvm install --alias=npm 0.10
174
+ nvm use ${{ matrix.node-version }}
175
+ if [[ "$(npm -v)" == 1.1.* ]]; then
176
+ nvm exec npm npm install -g npm@1.1
177
+ ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm"
178
+ else
179
+ sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
180
+ fi
181
+ npm config set strict-ssl false
182
+ dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
183
+
167
184
- name : Npm version fixes
168
185
if : ${{matrix.npm-version != ''}}
169
- run : npm install -g ${{ matrix.npm-version }}
186
+ shell : bash -eo pipefail -l {0}
187
+ run : |
188
+ npm install -g ${{ matrix.npm-version }}
170
189
171
190
- name : Configure npm
172
191
shell : bash -eo pipefail -l {0}
173
192
run : |
174
- if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
175
- npm config set strict-ssl false
176
- fi
177
193
npm config set package-lock false
178
194
179
195
- name : Remove npm module(s) ${{ matrix.npm-rm }}
0 commit comments