2020-11-07 16:09:08 +08:00
|
|
|
name: 'Tests: `nvm install-latest-npm`'
|
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
|
|
|
jobs:
|
2021-10-06 07:14:05 +08:00
|
|
|
matrix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
latest: ${{ steps.set-matrix.outputs.requireds }}
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- name: Harden Runner
|
|
|
|
uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
allowed-endpoints:
|
|
|
|
iojs.org:443
|
|
|
|
nodejs.org:443
|
2021-10-06 07:14:05 +08:00
|
|
|
- uses: ljharb/actions/node/matrix@main
|
|
|
|
id: set-matrix
|
|
|
|
with:
|
|
|
|
versionsAsRoot: true
|
|
|
|
type: majors
|
|
|
|
preset: '>=1'
|
|
|
|
|
2020-11-07 16:09:08 +08:00
|
|
|
nodes:
|
2021-10-06 07:14:05 +08:00
|
|
|
needs: [matrix]
|
2021-09-10 14:09:45 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2020-11-07 16:09:08 +08:00
|
|
|
name: 'nvm install-latest-npm'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
2021-09-01 06:28:41 +08:00
|
|
|
fail-fast: false
|
2020-11-07 16:09:08 +08:00
|
|
|
matrix:
|
2021-10-06 07:14:05 +08:00
|
|
|
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
|
|
|
|
include:
|
|
|
|
- node-version: "9.2"
|
|
|
|
- node-version: "9.1"
|
|
|
|
- node-version: "9.0"
|
|
|
|
- node-version: "6.1"
|
|
|
|
- node-version: "5.9"
|
|
|
|
- node-version: "4.6"
|
|
|
|
- node-version: "4.5"
|
|
|
|
- node-version: "4.4"
|
|
|
|
- node-version: "0.12"
|
|
|
|
- node-version: "0.10"
|
2020-11-07 16:09:08 +08:00
|
|
|
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- name: Harden Runner
|
|
|
|
uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
allowed-endpoints:
|
|
|
|
github.com:443
|
|
|
|
iojs.org:443
|
|
|
|
nodejs.org:443
|
|
|
|
registry.npmjs.org:443
|
2022-10-17 08:51:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-28 13:23:56 +08:00
|
|
|
- uses: ljharb/actions/node/install@main
|
2020-11-07 16:09:08 +08:00
|
|
|
name: 'nvm install-latest-npm'
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
skip-ls-check: true
|
|
|
|
skip-install: true
|
2021-07-28 13:23:56 +08:00
|
|
|
- run: npm --version
|
2020-11-07 16:09:08 +08:00
|
|
|
|
|
|
|
node:
|
2021-09-10 14:09:45 +08:00
|
|
|
permissions:
|
|
|
|
contents: none
|
2020-11-07 16:09:08 +08:00
|
|
|
name: 'nvm install-latest-npm'
|
|
|
|
needs: [nodes]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- name: Harden Runner
|
|
|
|
uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
egress-policy: block
|
2020-11-07 16:09:08 +08:00
|
|
|
- run: 'echo tests completed'
|