2020-05-19 20:25:54 +07:00
|
|
|
name: versions
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
2022-04-01 15:13:52 +07:00
|
|
|
- '**.md'
|
|
|
|
push:
|
2020-05-19 20:25:54 +07:00
|
|
|
branches:
|
2021-06-25 16:06:49 +07:00
|
|
|
- main
|
2020-05-19 20:25:54 +07:00
|
|
|
- releases/*
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2022-04-01 15:13:52 +07:00
|
|
|
|
2020-05-19 20:25:54 +07:00
|
|
|
jobs:
|
2020-06-30 01:56:37 +07:00
|
|
|
local-cache:
|
2021-01-21 02:15:22 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-05-19 20:25:54 +07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-21 02:15:22 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2024-05-22 20:12:24 +07:00
|
|
|
node-version: [18, 20, 22]
|
2020-06-30 01:56:37 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 01:56:37 +07: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 20:25:54 +07:00
|
|
|
shell: bash
|
2020-06-30 01:56:37 +07:00
|
|
|
|
2021-06-25 16:56:15 +07:00
|
|
|
lts-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-05-22 20:12:24 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-13]
|
2022-06-02 17:30:33 +07:00
|
|
|
node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*, lts/-1]
|
2021-06-25 16:56:15 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-25 16:56:15 +07:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-06-02 17:30:33 +07:00
|
|
|
check-latest: true
|
2024-05-22 20:12:24 +07:00
|
|
|
- if: runner.os != 'Windows' && runner.os != 'macOS'
|
2022-06-02 17:30:33 +07:00
|
|
|
name: Verify node and npm
|
|
|
|
run: |
|
|
|
|
. "$NVM_DIR/nvm.sh"
|
|
|
|
[[ $(nvm version-remote "${{ matrix.node-version }}") =~ ^v([^.]+) ]]
|
|
|
|
__tests__/verify-node.sh "${BASH_REMATCH[1]}"
|
|
|
|
shell: bash
|
2021-06-25 16:56:15 +07:00
|
|
|
|
2023-01-05 19:16:21 +07:00
|
|
|
v8-canary-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2023-03-08 15:47:38 +07:00
|
|
|
node-version:
|
|
|
|
[
|
|
|
|
'20-v8-canary',
|
|
|
|
'20.0.0-v8-canary',
|
2023-05-25 19:57:36 +07:00
|
|
|
'20.0.0-v8-canary20221101e50e45c9f8'
|
2023-03-08 15:47:38 +07:00
|
|
|
]
|
2023-01-05 19:16:21 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-05 19:16:21 +07: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 20:35:58 +07:00
|
|
|
nightly-syntax:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2023-03-08 15:47:38 +07:00
|
|
|
node-version:
|
2024-05-22 20:12:24 +07:00
|
|
|
[20.11.0-nightly202312211a0be537da, 21-nightly, 18.0.0-nightly]
|
2022-11-17 20:35:58 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-17 20:35:58 +07: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:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2024-05-22 20:12:24 +07:00
|
|
|
node-version: [20.0.0-rc.1, 18.0.0-rc.2, 19.0.0-rc.0]
|
2022-11-17 20:35:58 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-17 20:35:58 +07: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 01:56:37 +07:00
|
|
|
manifest:
|
2021-01-21 02:15:22 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 01:56:37 +07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-21 02:15:22 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2024-05-22 20:12:24 +07:00
|
|
|
node-version: [18.20.0, 20.10.0, 22.0.0]
|
2020-05-19 20:25:54 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 01:56:37 +07:00
|
|
|
- name: Setup Node
|
2020-05-19 20:25:54 +07:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-06-30 01:56:37 +07:00
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-05-19 20:25:54 +07:00
|
|
|
- name: Verify node and npm
|
2020-06-30 01:56:37 +07:00
|
|
|
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
check-latest:
|
2021-01-21 02:15:22 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 01:56:37 +07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-21 02:15:22 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2024-05-22 20:12:24 +07:00
|
|
|
node-version: [18, 20, 22]
|
2020-06-30 01:56:37 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 01:56:37 +07:00
|
|
|
- name: Setup Node and check latest
|
|
|
|
uses: ./
|
2020-05-19 20:25:54 +07:00
|
|
|
with:
|
2020-06-30 01:56:37 +07: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 20:25:54 +07:00
|
|
|
shell: bash
|
2020-06-30 01:56:37 +07:00
|
|
|
|
2021-11-29 16:18:31 +07:00
|
|
|
version-file:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2023-07-18 18:01:34 +07:00
|
|
|
node-version-file:
|
|
|
|
[.nvmrc, .tool-versions, .tool-versions-node, package.json]
|
2021-11-29 16:18:31 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2021-11-29 16:18:31 +07:00
|
|
|
- name: Setup node from node version file
|
|
|
|
uses: ./
|
|
|
|
with:
|
2021-12-01 22:44:59 +07:00
|
|
|
node-version-file: '__tests__/data/${{ matrix.node-version-file }}'
|
2021-11-29 16:18:31 +07:00
|
|
|
- name: Verify node
|
2024-05-22 20:12:24 +07:00
|
|
|
run: __tests__/verify-node.sh 20
|
2021-11-29 16:18:31 +07:00
|
|
|
|
2022-09-09 03:12:30 +07:00
|
|
|
version-file-volta:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-03-08 15:47:38 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2022-09-09 03:12:30 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2022-09-09 03:12:30 +07:00
|
|
|
- name: Setup node from node version file
|
|
|
|
uses: ./
|
|
|
|
with:
|
2023-12-29 16:31:21 +07:00
|
|
|
node-version-file: '__tests__/data/package-volta.json'
|
|
|
|
- name: Verify node
|
2024-05-22 20:12:24 +07:00
|
|
|
run: __tests__/verify-node.sh 20
|
2023-12-29 16:31:21 +07:00
|
|
|
|
|
|
|
version-file-volta-extends:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
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 03:12:30 +07:00
|
|
|
- name: Verify node
|
2024-05-22 20:12:24 +07:00
|
|
|
run: __tests__/verify-node.sh 20
|
2022-09-09 03:12:30 +07:00
|
|
|
|
2020-06-30 01:56:37 +07:00
|
|
|
node-dist:
|
2021-01-21 02:15:22 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 01:56:37 +07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-21 02:15:22 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2024-05-22 20:12:24 +07:00
|
|
|
node-version: [17, 19]
|
2020-06-30 01:56:37 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 01:56:37 +07:00
|
|
|
- name: Setup Node from dist
|
2020-05-19 20:25:54 +07:00
|
|
|
uses: ./
|
|
|
|
with:
|
2020-06-30 01:56:37 +07:00
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-05-19 20:25:54 +07:00
|
|
|
- name: Verify node and npm
|
2020-06-30 01:56:37 +07:00
|
|
|
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
old-versions:
|
2021-01-21 02:15:22 +07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-06-30 01:56:37 +07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-05-22 20:12:24 +07:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-13]
|
2020-06-30 01:56:37 +07:00
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-30 01:56:37 +07: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 02:28:47 +07:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
arch:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2024-05-22 20:12:24 +07:00
|
|
|
- name: Setup node 20 x86 from dist
|
2020-12-10 02:28:47 +07:00
|
|
|
uses: ./
|
|
|
|
with:
|
2024-05-22 20:12:24 +07:00
|
|
|
node-version: '20'
|
2020-12-10 02:28:47 +07:00
|
|
|
architecture: 'x86'
|
|
|
|
- name: Verify node
|
|
|
|
run: __tests__/verify-arch.sh "ia32"
|
2021-06-16 13:52:44 +07:00
|
|
|
shell: bash
|
2022-05-12 22:26:02 +07:00
|
|
|
|
|
|
|
node-latest-aliases:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
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 21:37:59 +07:00
|
|
|
echo "LATEST_NODE_VERSION=$latestNodeVersion" >> $GITHUB_OUTPUT
|
2022-05-12 22:26:02 +07:00
|
|
|
id: version
|
|
|
|
shell: bash
|
2023-10-23 21:22:01 +07:00
|
|
|
- uses: actions/checkout@v4
|
2022-05-12 22:26:02 +07:00
|
|
|
- name: Setup Node
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Retrieve version after install
|
|
|
|
run: |
|
|
|
|
updatedVersion=$(echo $(node --version))
|
2022-10-25 21:37:59 +07:00
|
|
|
echo "NODE_VERSION_UPDATED=$updatedVersion" >> $GITHUB_OUTPUT
|
2022-05-12 22:26:02 +07: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
|