Skip to content

Commit

Permalink
ci: update node versions matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Oct 18, 2024
1 parent 52ed54e commit 002dda8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 002dda8

Please sign in to comment.