Skip to content
78 changes: 3 additions & 75 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,79 +9,7 @@ permissions:
pull-requests: write
issues: read

concurrency:
group: ci-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run lint

typecheck:
name: "Typecheck"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run typecheck

test:
name: "Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run test -- --passWithNoTests || echo "No tests"

review:
name: "AI Review"
needs: [lint, typecheck]
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
id: files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files[].path' > /tmp/changed.txt
echo "Changed files:"
cat /tmp/changed.txt

- name: Run review
id: review
uses: anthropics/claude-code-base-action@main
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_tools: "View,GlobTool,Grep,Bash(git diff:*)"
max_turns: 10
prompt: |
Review this PR. Changed files are listed in /tmp/changed.txt.
Provide a brief code quality assessment.
Output your findings as a summary.

- name: Post comment
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "## 📋 AI Review

Status: Completed

Review ran successfully.

---
Claude Code CI"
ci:
uses: constellos/.github/.github/workflows/ci-pipeline-reusable.yml@main
secrets: inherit
Loading