diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2e14fec --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + working-directory: tui + run: bun install + + - name: Lint + working-directory: tui + run: bun run lint + + - name: Type check + working-directory: tui + run: bun run typecheck + + - name: Test + working-directory: tui + run: bun test + + - name: Build + working-directory: tui + run: bun run build + + validate-plugin: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Check plugin.json exists + run: test -f .claude-plugin/plugin.json + + - name: Check hooks.json exists + run: test -f hooks/hooks.json + + - name: Check scripts are executable + run: | + test -x scripts/session-start.sh + test -x scripts/capture-event.sh + test -x scripts/cleanup.sh + + - name: Validate JSON files + run: | + jq . .claude-plugin/plugin.json > /dev/null + jq . hooks/hooks.json > /dev/null