From 002dda8dcebe7f22be08b2ab4459b4756a301b0d Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Fri, 18 Oct 2024 10:04:31 +0200 Subject: [PATCH] ci: update node versions matrix --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 29 ++++++++++++++++++----------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b97712e5f4..adfab80595 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - id: cache-key diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6e54d7612..2aefafa901 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* registry-url: https://registry.npmjs.org always-auth: true - name: Load cached dist @@ -77,7 +77,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: node tools/release-notes env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55f73c7fcc..11a11b14c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: id: node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - name: Load cached dist @@ -37,16 +37,23 @@ jobs: - name: Check TypeScript type definitions run: npm run test:types + node-versions: + name: Get Node.js Versions + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.query.outputs.matrix }} + steps: + - id: query + run: | + echo "matrix=$(curl -s https://raw.githubusercontent.com/actions/node-versions/refs/heads/main/versions-manifest.json | jq -c '[.[] | select(.lts) | select(.version | split(".")[0] | tonumber >= 18) | .lts | ascii_downcase | "lts/\(.)"] + ["current"] | unique')" >> "$GITHUB_OUTPUT" node: needs: + - node-versions - build strategy: fail-fast: false matrix: - node-version: - - lts/hydrogen # 18 - - lts/iron # 20 - - current + node-version: ${{ fromJSON(needs.node-versions.outputs.matrix) }} suite: - tap:node - test @@ -95,7 +102,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - name: Test Deno @@ -121,7 +128,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - name: Test Bun @@ -137,7 +144,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - run: npm install --global workerd @@ -161,7 +168,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - name: Load cached dist @@ -194,7 +201,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - run: npm install --global testcafe@3 @@ -225,7 +232,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: lts/iron # 20 + node-version: lts/* cache: 'npm' - run: npm clean-install - name: Load cached dist