Skip to content

Commit 2b92530

Browse files
mickmickshclaude
andcommitted
fix: generate test fixtures in CI before TypeScript SDK tests
Parser tests require output/stripe-charges.lap which is compiled from examples. Added fixture generation step to both ci.yml and publish-npm.yml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b1a6927 commit 2b92530

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ jobs:
5757
working-directory: sdks/typescript
5858
run: npm ci
5959

60+
- name: Generate test fixtures
61+
run: |
62+
mkdir -p output
63+
pip install pyyaml
64+
python -c "
65+
from lap.core.compilers.openapi import compile_openapi
66+
spec = compile_openapi('examples/verbose/openapi/stripe-charges.yaml')
67+
with open('output/stripe-charges.lap', 'w') as f:
68+
f.write(spec.to_lap())
69+
"
70+
6071
- name: Run test suite
6172
working-directory: sdks/typescript
6273
run: npm test

.github/workflows/publish-npm.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ jobs:
2222
- name: Install dependencies
2323
run: npm ci
2424

25+
- name: Generate test fixtures
26+
working-directory: .
27+
run: |
28+
mkdir -p output
29+
pip install pyyaml
30+
python -c "
31+
from lap.core.compilers.openapi import compile_openapi
32+
spec = compile_openapi('examples/verbose/openapi/stripe-charges.yaml')
33+
with open('output/stripe-charges.lap', 'w') as f:
34+
f.write(spec.to_lap())
35+
"
36+
2537
- name: Build and test
2638
run: npm test
2739

0 commit comments

Comments
 (0)