Skip to content

Commit 2e9f43d

Browse files
ci: add basic test
1 parent 1783d2b commit 2e9f43d

6 files changed

Lines changed: 331 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,30 @@ jobs:
4343

4444
- name: Typecheck
4545
run: pnpm run test:types
46+
47+
test:
48+
runs-on: ${{ matrix.os }}
49+
50+
strategy:
51+
matrix:
52+
node: [18]
53+
os: [ubuntu-latest]
54+
fail-fast: false
55+
56+
steps:
57+
- uses: actions/checkout@v3
58+
59+
- uses: actions/setup-node@v3
60+
with:
61+
node-version: ${{ matrix.node }}
62+
63+
- run: corepack enable
64+
65+
- name: Install
66+
run: pnpm i
67+
68+
- name: Build
69+
run: pnpm run build
70+
71+
- name: Test
72+
run: pnpm run test

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,19 @@
5353
"lint": "eslint .",
5454
"lint:fix": "eslint . --fix",
5555
"release": "bumpp --commit --push --tag",
56+
"test": "tsx test/index.ts",
5657
"test:types": "tsc --noEmit"
5758
},
5859
"peerDependencies": {
5960
"pdfjs-dist": "^3.9.179"
6061
},
6162
"devDependencies": {
6263
"@antfu/eslint-config": "^0.40.2",
64+
"@types/node": "^20.4.10",
6365
"bumpp": "^9.1.1",
6466
"eslint": "^8.47.0",
6567
"pdfjs-dist": "^3.9.179",
68+
"tsx": "^3.12.7",
6669
"typescript": "^5.1.6",
6770
"unbuild": "^2.0.0-rc.0"
6871
}

0 commit comments

Comments
 (0)