Skip to content

Commit 4556b7c

Browse files
authored
chore: do not test on EOL Node.js versions (#124)
BREAKING CHANGE: `package.json` now contains `engines.node`
1 parent 5aa959c commit 4556b7c

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

.github/workflows/node.js.yml

+16-23
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,19 @@ on:
1010
branches: [ main ]
1111

1212
jobs:
13-
build:
14-
15-
runs-on: ubuntu-latest
16-
17-
strategy:
18-
matrix:
19-
node-version: [16.x, 18.x, 20.x]
20-
21-
steps:
22-
- uses: actions/checkout@v3
23-
with:
24-
# Need commit history test for cli-tests
25-
fetch-depth: 0
26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
28-
with:
29-
node-version: ${{ matrix.node-version }}
30-
- run: npm install
31-
- run: npm run build --if-present
32-
- run: npm run test-ci
33-
env:
34-
CI: true
35-
- run: bash <(curl -s https://codecov.io/bash)
13+
test:
14+
name: Test on Node.js
15+
uses: pkgjs/action/.github/workflows/node-test.yaml@v0
16+
with:
17+
# We need to fetch some specific commits that we are using in our tests. We also need `--deepen=2` for CodCov.
18+
post-checkout-steps: |
19+
- run: git fetch --deepen=2 origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081
20+
shell: bash
21+
post-install-steps: |
22+
- run: npm run build --if-present
23+
shell: bash
24+
test-command: npm run test-ci
25+
post-test-steps: |
26+
- name: Upload coverage report to Codecov
27+
run: bash <(curl -s https://codecov.io/bash)
28+
shell: bash

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"bin": {
3030
"core-validate-commit": "./bin/cmd.js"
3131
},
32+
"engines": {
33+
"node": "^18.18.0 || >=20.10.0"
34+
},
3235
"author": "Evan Lucas <[email protected]>",
3336
"repository": {
3437
"type": "git",

0 commit comments

Comments
 (0)