Skip to content

Commit

Permalink
chore: do not test on EOL Node.js versions (#124)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `package.json` now contains `engines.node`
  • Loading branch information
aduh95 authored Sep 2, 2024
1 parent 5aa959c commit 4556b7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,19 @@ on:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
with:
# Need commit history test for cli-tests
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm run test-ci
env:
CI: true
- run: bash <(curl -s https://codecov.io/bash)
test:
name: Test on Node.js
uses: pkgjs/action/.github/workflows/node-test.yaml@v0
with:
# We need to fetch some specific commits that we are using in our tests. We also need `--deepen=2` for CodCov.
post-checkout-steps: |
- run: git fetch --deepen=2 origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081
shell: bash
post-install-steps: |
- run: npm run build --if-present
shell: bash
test-command: npm run test-ci
post-test-steps: |
- name: Upload coverage report to Codecov
run: bash <(curl -s https://codecov.io/bash)
shell: bash
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"bin": {
"core-validate-commit": "./bin/cmd.js"
},
"engines": {
"node": "^18.18.0 || >=20.10.0"
},
"author": "Evan Lucas <evanlucas@me.com>",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4556b7c

Please sign in to comment.