Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,34 @@ env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}

jobs:
typecheck:
name: TypeScript type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"

- name: Install dependencies
run: npm ci
working-directory: crates/bashkit-js

- name: Build native binding (generates type declarations)
run: npm run build
working-directory: crates/bashkit-js

- name: Type-check (including tests)
run: npx tsc --noEmit -p tsconfig.check.json
working-directory: crates/bashkit-js

build-and-test:
name: ${{ matrix.runtime }} ${{ matrix.version }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -166,11 +194,15 @@ jobs:
js-check:
name: JS Check
if: always()
needs: [build-and-test]
needs: [typecheck, build-and-test]
runs-on: ubuntu-latest
steps:
- name: Verify all jobs passed
run: |
if [[ "${{ needs.typecheck.result }}" != "success" ]]; then
echo "TypeScript type-check failed"
exit 1
fi
if [[ "${{ needs.build-and-test.result }}" != "success" ]]; then
echo "JS build/test failed"
exit 1
Expand Down
18 changes: 18 additions & 0 deletions crates/bashkit-js/tsconfig.check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"sourceMap": false,
"noEmit": true
},
"include": [
"wrapper.ts",
"langchain.ts",
"anthropic.ts",
"openai.ts",
"ai.ts",
"__test__/**/*.spec.ts"
],
"exclude": ["node_modules"]
}
Loading