Skip to content

Commit 6aa79ac

Browse files
committed
Add GitHub Actions test workflow
1 parent e4e6382 commit 6aa79ac

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
9+
concurrency:
10+
group: tests-${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
name: Lint, Build, Test
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 20
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 10
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: pnpm
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Lint
38+
run: pnpm exec eslint src tests
39+
40+
- name: Build
41+
run: pnpm run build
42+
43+
- name: Run tests
44+
run: pnpm run test:ci

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
"lint": "eslint .",
4646
"pretest": "tsc --project tsconfig.test.json --noEmit",
4747
"test": "vitest run",
48+
"test:ci": "vitest run --exclude tests/build-api-examples.test.ts --exclude tests/signing-api-examples.test.ts",
49+
"test:integration": "vitest run tests/build-api-examples.test.ts tests/signing-api-examples.test.ts",
4850
"test:watch": "vitest",
4951
"clean": "shx rm -rf dist"
5052
},

0 commit comments

Comments
 (0)