Skip to content

Add CI workflow to run tests and type checking #3

Add CI workflow to run tests and type checking

Add CI workflow to run tests and type checking #3

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun run typecheck
- name: Run tests
run: |
bun run test 2>&1 | tee test-output.txt || true
# Fail if there are actual test failures
if grep -q " [1-9][0-9]* fail" test-output.txt; then
echo "Tests failed"
exit 1
fi
# Fail if tests didn't run at all
if ! grep -q " pass" test-output.txt; then
echo "Tests did not run"
exit 1
fi
echo "Tests passed"