Skip to content

Commit 22418fc

Browse files
authored
fix(test): add test workflow (#20)
* add test workflow * use lts versiones * only main branch
1 parent 79dcc7a commit 22418fc

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/test.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: "test"
13+
cancel-in-progress: false
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node-version: [18, 19, 20, 21, 22, 23]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- name: npm install and test
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: npm it

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,8 @@
5858
"npm": "^6.10.3",
5959
"regenerator-runtime": "^0.13.3",
6060
"yargs": "^13.3.0"
61+
},
62+
"engines": {
63+
"node": ">=18"
6164
}
6265
}

0 commit comments

Comments
 (0)