mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-28 10:44:21 +01:00
- Add GitHub Actions workflow for automated testing - Include lint, typecheck, test, and build validation - Support Node.js 20.12.0+ with matrix strategy - Use pnpm 10.8.1 with dependency caching - Verify CLI binary creation in build step 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
name: Quality Checks
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: ['20.12.0', '22']
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.8.1
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run linting
|
|
run: pnpm lint
|
|
|
|
- name: Run type checking
|
|
run: pnpm typecheck
|
|
|
|
- name: Run tests
|
|
run: pnpm test
|
|
|
|
- name: Build project
|
|
run: pnpm build
|
|
|
|
- name: Verify build artifacts
|
|
run: |
|
|
if [ ! -f "dist/index.js" ]; then
|
|
echo "Build failed: dist/index.js not found"
|
|
exit 1
|
|
fi
|
|
echo "Build successful: dist/index.js created" |