Skip to content

Commit eeca83d

Browse files
Add workflows / tests
1 parent cf48d8e commit eeca83d

2 files changed

Lines changed: 38 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
nodejs:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [18.x, 20.x, 22.x]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Node.js specs ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npm run test
22+
types:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
node-version: [22.x]
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Type checks ${{ matrix.node-version }}
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
- run: npm ci
34+
- run: npm run build
35+
- run: npx --yes @arethetypeswrong/cli@latest --pack .

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"esnext": "./dist/index.js",
99
"bin": "./bin/cli.js",
1010
"scripts": {
11-
"ts": "./node_modules/.bin/tsc -p .",
12-
"rollup": "./node_modules/.bin/rollup -c",
1311
"build": "npm run ts && npm run rollup",
12+
"perf": "./node_modules/.bin/matcha perf.js",
13+
"rollup": "./node_modules/.bin/rollup -c",
1414
"test": "./node_modules/.bin/istanbul cover node_modules/mocha/bin/_mocha -- -R spec",
15-
"perf": "./node_modules/.bin/matcha perf.js"
15+
"ts": "./node_modules/.bin/tsc -p ."
1616
},
1717
"files": [
1818
"bin",

0 commit comments

Comments
 (0)