2020-05-19 21:25:54 +08:00
|
|
|
name: versions
|
|
|
|
|
|
|
|
on:
|
2024-10-10 20:46:57 +08:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2024-09-30 15:26:19 +08:00
|
|
|
push:
|
|
|
|
branches:
|
2024-10-10 20:46:57 +08:00
|
|
|
- main
|
|
|
|
- releases/*
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2022-04-01 16:13:52 +08:00
|
|
|
|
2020-05-19 21:25:54 +08:00
|
|
|
jobs:
|
2020-06-30 02:56:37 +08:00
|
|
|
local-cache:
|
2021-01-21 03:15:22 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-05-19 21:25:54 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2024-05-22 21:12:24 +08:00
|
|
|
node-version: [18, 20, 22]
|
2020-06-30 02:56:37 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 02:56:37 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Verify node and npm
|
|
|
|
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
|
2020-05-19 21:25:54 +08:00
|
|
|
shell: bash
|
2020-06-30 02:56:37 +08:00
|
|
|
|
2021-06-25 17:56:15 +08:00
|
|
|
lts-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-13]
|
2022-06-02 18:30:33 +08:00
|
|
|
node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*, lts/-1]
|
2021-06-25 17:56:15 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-25 17:56:15 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-06-02 18:30:33 +08:00
|
|
|
check-latest: true
|
2024-10-10 20:27:38 +08:00
|
|
|
|
2024-09-30 21:46:05 +08:00
|
|
|
- name: Verify node and npm
|
2022-06-02 18:30:33 +08:00
|
|
|
run: |
|
2024-09-30 16:41:13 +08:00
|
|
|
node_version=$(node --version)
|
|
|
|
major_version=${node_version:1:2}
|
|
|
|
__tests__/verify-node.sh "$major_version"
|
2022-06-02 18:30:33 +08:00
|
|
|
shell: bash
|
2021-06-25 17:56:15 +08:00
|
|
|
|
2023-01-05 20:16:21 +08:00
|
|
|
v8-canary-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2023-03-08 16:47:38 +08:00
|
|
|
node-version:
|
|
|
|
[
|
|
|
|
'20-v8-canary',
|
|
|
|
'20.0.0-v8-canary',
|
2023-05-25 20:57:36 +08:00
|
|
|
'20.0.0-v8-canary20221101e50e45c9f8'
|
2023-03-08 16:47:38 +08:00
|
|
|
]
|
2023-01-05 20:16:21 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-05 20:16:21 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Verify node and npm
|
|
|
|
run: |
|
|
|
|
canaryVersion="${{ matrix.node-version }}"
|
|
|
|
majorVersion=$(echo $canaryVersion | cut -d- -f1)
|
|
|
|
__tests__/verify-node.sh "$majorVersion"
|
|
|
|
shell: bash
|
|
|
|
|
2022-11-17 21:35:58 +08:00
|
|
|
nightly-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2023-03-08 16:47:38 +08:00
|
|
|
node-version:
|
2024-05-22 21:12:24 +08:00
|
|
|
[20.11.0-nightly202312211a0be537da, 21-nightly, 18.0.0-nightly]
|
2022-11-17 21:35:58 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-17 21:35:58 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Verify node and npm
|
|
|
|
run: |
|
|
|
|
nightlyVersion="${{ matrix.node-version }}"
|
|
|
|
majorVersion=$(echo $nightlyVersion | cut -d- -f1)
|
|
|
|
__tests__/verify-node.sh "$majorVersion"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
rc-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2024-05-22 21:12:24 +08:00
|
|
|
node-version: [20.0.0-rc.1, 18.0.0-rc.2, 19.0.0-rc.0]
|
2022-11-17 21:35:58 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-17 21:35:58 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Verify node and npm
|
|
|
|
run: |
|
|
|
|
rcVersion="${{ matrix.node-version }}"
|
|
|
|
majorVersion=$(echo $rcVersion | cut -d- -f1)
|
|
|
|
__tests__/verify-node.sh "$majorVersion"
|
|
|
|
shell: bash
|
|
|
|
|
2020-06-30 02:56:37 +08:00
|
|
|
manifest:
|
2021-01-21 03:15:22 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 02:56:37 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2024-05-22 21:12:24 +08:00
|
|
|
node-version: [18.20.0, 20.10.0, 22.0.0]
|
2020-05-19 21:25:54 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 02:56:37 +08:00
|
|
|
- name: Setup Node
|
2020-05-19 21:25:54 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-06-30 02:56:37 +08:00
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-05-19 21:25:54 +08:00
|
|
|
- name: Verify node and npm
|
2020-06-30 02:56:37 +08:00
|
|
|
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
check-latest:
|
2021-01-21 03:15:22 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 02:56:37 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2024-05-22 21:12:24 +08:00
|
|
|
node-version: [18, 20, 22]
|
2020-06-30 02:56:37 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 02:56:37 +08:00
|
|
|
- name: Setup Node and check latest
|
|
|
|
uses: ./
|
2020-05-19 21:25:54 +08:00
|
|
|
with:
|
2020-06-30 02:56:37 +08:00
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
check-latest: true
|
|
|
|
- name: Verify node and npm
|
|
|
|
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
|
2020-05-19 21:25:54 +08:00
|
|
|
shell: bash
|
2020-06-30 02:56:37 +08:00
|
|
|
|
2021-11-29 17:18:31 +08:00
|
|
|
version-file:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2023-07-18 19:01:34 +08:00
|
|
|
node-version-file:
|
|
|
|
[.nvmrc, .tool-versions, .tool-versions-node, package.json]
|
2021-11-29 17:18:31 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2021-11-29 17:18:31 +08:00
|
|
|
- name: Setup node from node version file
|
|
|
|
uses: ./
|
|
|
|
with:
|
2021-12-01 23:44:59 +08:00
|
|
|
node-version-file: '__tests__/data/${{ matrix.node-version-file }}'
|
2021-11-29 17:18:31 +08:00
|
|
|
- name: Verify node
|
2024-05-22 21:12:24 +08:00
|
|
|
run: __tests__/verify-node.sh 20
|
2021-11-29 17:18:31 +08:00
|
|
|
|
2022-09-09 04:12:30 +08:00
|
|
|
version-file-volta:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2022-09-09 04:12:30 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-09-09 04:12:30 +08:00
|
|
|
- name: Setup node from node version file
|
|
|
|
uses: ./
|
|
|
|
with:
|
2023-12-29 17:31:21 +08:00
|
|
|
node-version-file: '__tests__/data/package-volta.json'
|
|
|
|
- name: Verify node
|
2024-05-22 21:12:24 +08:00
|
|
|
run: __tests__/verify-node.sh 20
|
2023-12-29 17:31:21 +08:00
|
|
|
|
|
|
|
version-file-volta-extends:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2023-12-29 17:31:21 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node from node version file
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version-file: '__tests__/data/package-volta-extends.json'
|
2022-09-09 04:12:30 +08:00
|
|
|
- name: Verify node
|
2024-05-22 21:12:24 +08:00
|
|
|
run: __tests__/verify-node.sh 20
|
2022-09-09 04:12:30 +08:00
|
|
|
|
2020-06-30 02:56:37 +08:00
|
|
|
node-dist:
|
2021-01-21 03:15:22 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 02:56:37 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2024-05-22 21:12:24 +08:00
|
|
|
node-version: [17, 19]
|
2020-06-30 02:56:37 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 02:56:37 +08:00
|
|
|
- name: Setup Node from dist
|
2020-05-19 21:25:54 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-06-30 02:56:37 +08:00
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-05-19 21:25:54 +08:00
|
|
|
- name: Verify node and npm
|
2020-06-30 02:56:37 +08:00
|
|
|
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
old-versions:
|
2021-01-21 03:15:22 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 02:56:37 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-13]
|
2020-06-30 02:56:37 +08:00
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 02:56:37 +08:00
|
|
|
# test old versions which didn't have npm and layout different
|
|
|
|
- name: Setup node 0.12.18 from dist
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: 0.12.18
|
|
|
|
- name: Verify node
|
|
|
|
run: __tests__/verify-node.sh 0.12.18 SKIP_NPM
|
2020-12-10 03:28:47 +08:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
arch:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2024-05-22 21:12:24 +08:00
|
|
|
- name: Setup node 20 x86 from dist
|
2020-12-10 03:28:47 +08:00
|
|
|
uses: ./
|
|
|
|
with:
|
2024-05-22 21:12:24 +08:00
|
|
|
node-version: '20'
|
2020-12-10 03:28:47 +08:00
|
|
|
architecture: 'x86'
|
|
|
|
- name: Verify node
|
|
|
|
run: __tests__/verify-arch.sh "ia32"
|
2021-06-16 14:52:44 +08:00
|
|
|
shell: bash
|
2022-05-12 23:26:02 +08:00
|
|
|
|
|
|
|
node-latest-aliases:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-10 20:36:07 +08:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
|
2022-05-12 23:26:02 +08:00
|
|
|
node-version: [current, latest, node]
|
|
|
|
steps:
|
|
|
|
- name: Get node version
|
|
|
|
run: |
|
|
|
|
latestNodeVersion=$(curl https://nodejs.org/dist/index.json | jq -r '. [0].version')
|
2022-10-25 22:37:59 +08:00
|
|
|
echo "LATEST_NODE_VERSION=$latestNodeVersion" >> $GITHUB_OUTPUT
|
2022-05-12 23:26:02 +08:00
|
|
|
id: version
|
|
|
|
shell: bash
|
2023-10-23 22:22:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-05-12 23:26:02 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Retrieve version after install
|
|
|
|
run: |
|
|
|
|
updatedVersion=$(echo $(node --version))
|
2022-10-25 22:37:59 +08:00
|
|
|
echo "NODE_VERSION_UPDATED=$updatedVersion" >> $GITHUB_OUTPUT
|
2022-05-12 23:26:02 +08:00
|
|
|
id: updatedVersion
|
|
|
|
shell: bash
|
|
|
|
- name: Compare versions
|
|
|
|
if: ${{ steps.version.outputs.LATEST_NODE_VERSION != steps.updatedVersion.outputs.NODE_VERSION_UPDATED}}
|
|
|
|
run: |
|
|
|
|
echo "Latest node version failed to download."
|
|
|
|
exit 1
|