Skip to content

Commit

Permalink
chore(npm-test.yml): update node-version in lint job to use 'current'…
Browse files Browse the repository at this point in the history
… instead of 'latest' for consistency

feat(npm-test.yml): add new 'test' job to run tests on various Node.js versions for better compatibility
feat(npm-test.yml): add new 'build' job to build the project on various Node.js versions for better compatibility
  • Loading branch information
ignlg committed Apr 10, 2024
1 parent 75669b4 commit 8dfedfd
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ on:
branches: ["master", "next"]

jobs:
build:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [lts/*, latest]
node-version: [lts/*, current]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -26,7 +26,43 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install --global yarn
- run: yarn
# - run: npm run build --if-present
- run: yarn --immutable
- run: npm run lint

test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [lts/*, current, 18, 16, 14, 12, 10]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install --global yarn
- run: yarn --immutable
- run: npm run test

build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [lts/*, current]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install --global yarn
- run: yarn --immutable
- run: npm run build

0 comments on commit 8dfedfd

Please sign in to comment.