Skip to content

fix(tar): pass -C directory to create_tar for VFS file resolution #782

fix(tar): pass -C directory to create_tar for VFS file resolution

fix(tar): pass -C directory to create_tar for VFS file resolution #782

Workflow file for this run

# JavaScript/TypeScript CI — builds NAPI-RS bindings and runs tests
# Triggered on PRs and pushes to main when JS-related files change.
name: JS
on:
push:
branches: [main]
paths:
- "crates/bashkit-js/**"
- "crates/bashkit/src/**"
- "examples/*.mjs"
- "examples/package.json"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/js.yml"
pull_request:
branches: [main]
paths:
- "crates/bashkit-js/**"
- "crates/bashkit/src/**"
- "examples/*.mjs"
- "examples/package.json"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/js.yml"
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
jobs:
build-and-test:
name: ${{ matrix.runtime }} ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Node.js versions
- runtime: node
version: "20"
run: "node"
- runtime: node
version: "22"
run: "node"
- runtime: node
version: "24"
run: "node"
- runtime: node
version: "latest"
run: "node"
# Bun
- runtime: bun
version: "latest"
run: "bun"
- runtime: bun
version: "canary"
run: "bun"
# Deno
- runtime: deno
version: "2.x"
run: "deno run -A"
- runtime: deno
version: "canary"
run: "deno run -A"
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup Node.js
if: matrix.runtime == 'node'
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.version }}
- name: Setup Node.js (for napi build)
if: matrix.runtime != 'node'
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Setup Bun
if: matrix.runtime == 'bun'
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.version }}
- name: Setup Deno
if: matrix.runtime == 'deno'
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.version }}
- name: Install dependencies
run: npm install
working-directory: crates/bashkit-js
- name: Build native binding
run: npm run build
working-directory: crates/bashkit-js
- name: Run ava tests (Node only)
if: matrix.runtime == 'node'
run: npm test
working-directory: crates/bashkit-js
- name: Run runtime-compat tests (Node)
if: matrix.runtime == 'node'
run: node --test __test__/runtime-compat/*.test.mjs
working-directory: crates/bashkit-js
- name: Run runtime-compat tests (Bun)
if: matrix.runtime == 'bun'
run: bun test __test__/runtime-compat/
working-directory: crates/bashkit-js
- name: Run runtime-compat tests (Deno)
if: matrix.runtime == 'deno'
run: |
for f in __test__/runtime-compat/*.test.mjs; do
echo "--- $f ---"
deno run -A "$f"
done
working-directory: crates/bashkit-js
- name: Install example dependencies and link local build
working-directory: examples
run: |
npm install
rm -rf node_modules/@everruns/bashkit
mkdir -p node_modules/@everruns
ln -s ${{ github.workspace }}/crates/bashkit-js node_modules/@everruns/bashkit
- name: Run examples (self-contained)
working-directory: examples
run: |
${{ matrix.run }} bash_basics.mjs
${{ matrix.run }} data_pipeline.mjs
${{ matrix.run }} llm_tool.mjs
${{ matrix.run }} langchain_integration.mjs
- name: Install Doppler CLI
if: env.DOPPLER_TOKEN != ''
uses: dopplerhq/cli-action@v4
- name: Run AI examples
if: env.DOPPLER_TOKEN != ''
working-directory: examples
run: |
doppler run -- ${{ matrix.run }} openai_tool.mjs
doppler run -- ${{ matrix.run }} vercel_ai_tool.mjs
doppler run -- ${{ matrix.run }} langchain_agent.mjs
# Gate job for branch protection
js-check:
name: JS Check
if: always()
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- name: Verify all jobs passed
run: |
if [[ "${{ needs.build-and-test.result }}" != "success" ]]; then
echo "JS build/test failed"
exit 1
fi