Simplify the test flow, drop EOL'd Node version

This commit is contained in:
Claudia Meadows 2024-09-24 16:45:48 -07:00
parent 9d7cf4d474
commit 745dfb614a
No known key found for this signature in database
GPG key ID: C86B594396786760
2 changed files with 21 additions and 53 deletions

View file

@ -10,32 +10,35 @@ permissions:
actions: write
contents: read
# This uses actions/checkout instead of `git clone` directly since it's way
# easier than parsing everything out.
jobs:
lint-js:
uses: ./.github/workflows/_npm-task.yml
with:
task: lint:js
build-js:
needs: lint-js
uses: ./.github/workflows/_npm-task.yml
with:
task: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run lint
- run: npm run build
test-js:
needs: build-js
needs: lint-js
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version:
- 16
- 18
- 20
- 22
uses: ./.github/workflows/_npm-task.yml
with:
node-version: ${{ matrix.node-version }}
task: test:js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci-test