feat: Add AI-powered Smart Test Runner system #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🧠 AI PR Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, edited] | |
| jobs: | |
| review: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 💎 Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3.5' | |
| bundler-cache: true | |
| - name: 📦 Install dependencies | |
| run: | | |
| bundle config set --local path 'vendor/bundle' | |
| bundle install --jobs 4 --retry 3 | |
| - name: Run checks | |
| run: | | |
| mkdir -p reports | |
| bundle exec rspec --format documentation > reports/rspec.txt || true | |
| bundle exec rubocop --format simple > reports/rubocop.txt || true | |
| bundle exec brakeman --force -o reports/brakeman.txt || true | |
| - name: Run AI Review | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| API_PROVIDER: ${{ vars.API_PROVIDER || 'dust' }} | |
| DUST_AGENT_ID: ${{ vars.DUST_AGENT_ID }} | |
| DUST_API_KEY: ${{ secrets.DUST_API_KEY }} | |
| DUST_WORKSPACE_ID: ${{ vars.DUST_WORKSPACE_ID }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: bundle exec ruby .github/scripts/pr_review.rb |