From 746f200ccd643b24d522e7ec774483ac670436ca Mon Sep 17 00:00:00 2001 From: Priya Gupta <147705955+priyagupta108@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:22:50 +0530 Subject: [PATCH] Refactor GitHub Actions workflow for OS and Node versions Updated the workflow to support multiple OS and Node.js versions, and upgraded checkout action from v4 to v5. --- .github/workflows/versions.yml | 70 +++++++++++++++++----------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 86384ecf..cb5304c8 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -17,10 +17,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] - node-version: [18, 20, 22] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] + node-version: [20, 22, 24] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: @@ -34,10 +34,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest-large] node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*, lts/-1] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] node-version: [ '20-v8-canary', @@ -64,7 +64,7 @@ jobs: '20.0.0-v8-canary20221101e50e45c9f8' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: @@ -81,10 +81,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] - node-version: [20-nightly, 21-nightly, 18.0.0-nightly] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] + node-version: [20-nightly, 25-nightly, 24.0.0-nightly] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: @@ -101,10 +101,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] - node-version: [20.0.0-rc.1, 18.0.0-rc.2, 19.0.0-rc.0] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] + node-version: [20.0.0-rc.1, 22.14.0-rc.1, 24.0.0-rc.4] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: @@ -121,10 +121,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] - node-version: [18.20.0, 20.10.0, 22.0.0] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] + node-version: [20.10.0, 22.0.0, 24.9.0] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: @@ -138,10 +138,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] - node-version: [18, 20, 22] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] + node-version: [20, 22, 24] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node and check latest uses: ./ with: @@ -156,57 +156,57 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] node-version-file: [.nvmrc, .tool-versions, .tool-versions-node, package.json] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup node from node version file uses: ./ with: node-version-file: '__tests__/data/${{ matrix.node-version-file }}' - name: Verify node - run: __tests__/verify-node.sh 20 + run: __tests__/verify-node.sh 24 version-file-volta: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup node from node version file uses: ./ with: node-version-file: '__tests__/data/package-volta.json' - name: Verify node - run: __tests__/verify-node.sh 20 + run: __tests__/verify-node.sh 24 version-file-volta-extends: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup node from node version file uses: ./ with: node-version-file: '__tests__/data/package-volta-extends.json' - name: Verify node - run: __tests__/verify-node.sh 20 + run: __tests__/verify-node.sh 24 node-dist: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] node-version: [17, 19] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node from dist uses: ./ with: @@ -220,9 +220,9 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest-large] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 # test old versions which didn't have npm and layout different - name: Setup node 0.12.18 from dist uses: ./ @@ -235,7 +235,7 @@ jobs: arch: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup node 20 x86 from dist uses: ./ with: @@ -250,7 +250,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14-large] + os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large] node-version: [current, latest, node] steps: - name: Get node version @@ -259,7 +259,7 @@ jobs: echo "LATEST_NODE_VERSION=$latestNodeVersion" >> $GITHUB_OUTPUT id: version shell: bash - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Node uses: ./ with: