Skip to content

Commit 0fb8d29

Browse files
sirdeggenclaude
andcommitted
feat(conformance): TS vector runner (Jest) + GitHub Actions CI
Adds a TypeScript Jest-based conformance runner that executes all 216 vectors under conformance/vectors/ against @bsv/sdk, achieving 213 passing / 3 skipped (parity_class=intended). Also adds a GitHub Actions workflow running both Go and TS runners on push/PR to main and phase2/boundary-specs. Fixes broken @bsv/paymail version ref in ts-paymail examples so pnpm install succeeds in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4301348 commit 0fb8d29

7 files changed

Lines changed: 1564 additions & 1244 deletions

File tree

.github/workflows/conformance.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Conformance
2+
3+
on:
4+
push:
5+
branches: [main, phase2/boundary-specs]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
go-runner:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: '1.22'
17+
- name: Run Go conformance runner
18+
run: go run ./conformance/runner/go/main.go
19+
working-directory: ${{ github.workspace }}
20+
21+
ts-runner:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
- uses: pnpm/action-setup@v3
29+
with:
30+
version: 9
31+
- name: Install deps
32+
run: pnpm install --no-frozen-lockfile
33+
- name: Build TS SDK
34+
run: pnpm --filter @bsv/sdk run build
35+
- name: Run TS conformance runner
36+
run: pnpm --filter @bsv/conformance-runner-ts test
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
export default {
3+
preset: 'ts-jest/presets/default-esm',
4+
testEnvironment: 'node',
5+
extensionsToTreatAsEsm: ['.ts'],
6+
transform: {
7+
'^.+\\.ts$': ['ts-jest', {
8+
useESM: true,
9+
tsconfig: {
10+
target: 'ES2020',
11+
module: 'NodeNext',
12+
moduleResolution: 'NodeNext',
13+
esModuleInterop: true,
14+
resolveJsonModule: true,
15+
skipLibCheck: true,
16+
strict: false
17+
}
18+
}]
19+
},
20+
moduleNameMapper: {
21+
'^(\\.{1,2}/.*)\\.js$': '$1'
22+
},
23+
testMatch: ['**/*.test.ts'],
24+
testTimeout: 30000
25+
}

conformance/runner/ts/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@bsv/conformance-runner-ts",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"test": "jest --config jest.config.mjs"
7+
},
8+
"devDependencies": {
9+
"@bsv/sdk": "workspace:*",
10+
"@jest/globals": "^30.3.0",
11+
"jest": "^30.3.0",
12+
"ts-jest": "^29.4.9",
13+
"typescript": "^5.9.3"
14+
}
15+
}

0 commit comments

Comments
 (0)