Skip to content

Commit ddced72

Browse files
committed
feat(workflows): add tests workflow
1 parent 526e988 commit ddced72

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: "npm"
25+
- run: npm ci
26+
# - run: npm run build --if-present
27+
- run: npm test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"locc": "index.js"
2222
},
2323
"scripts": {
24-
"test": "echo \"Error: no test specified\" && exit 1"
24+
"test": "jest"
2525
},
2626
"files": [
2727
"index.js",

0 commit comments

Comments
 (0)