Skip to content

fix(ci): build before CLI smoke tests; tests self-build on fresh clones #2

fix(ci): build before CLI smoke tests; tests self-build on fresh clones

fix(ci): build before CLI smoke tests; tests self-build on fresh clones #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["22", "24"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
# Some npm versions gate install scripts; esbuild needs its postinstall
# to wire the platform binary used by tsx and vitest.
- name: Install dependencies
run: npm install && npm rebuild esbuild
- name: Typecheck
run: npm run typecheck
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Unit & integration tests (offline, mock model)
run: npm test
- name: CLI smoke
run: |
node dist/cli/index.js --version
node dist/cli/index.js --help > /dev/null
TINYCODE_MODEL=mock TINYCODE_HOME="$PWD/.tmp/ci-home" node dist/cli/index.js -p "hello" | grep "TinyCode mock model"