Run tests on changed code only.
Map the PR diff to impacted tests — not the full suite every time. Save GitHub Actions minutes. Python/pytest live today. Go, Java, JS, .NET, Rust on the roadmap. No LLM key for selection.
What it does
Intelligent test selection on your runners.
Same job as CircleCI Smarter Testing — without leaving GitHub Actions.
Python / pytest
Diff-scoped selection via collect-only + import heuristics + optional coverage.xml.
Go · Java · JS · .NET · Rust
Wire verify-cmd today. Collectors ship per language — no workflow rewrite.
Every stack today
Doc-only PR skip · JSON report · flake memory with CI cache.
How it works
Four steps. One verify command.
Fallback to full suite when confidence is low.
Secrets → Actions
Pull these from repository secrets.
Settings → Secrets and variables → Actions
GITHUB_TOKEN
Built-in. Reference as ${{ secrets.GITHUB_TOKEN }}
CODE_AGENT_LICENSE_KEY
After Free CI quota. ${{ secrets.CODE_AGENT_LICENSE_KEY }}
GEMINI_API_KEY
test-intel selection is heuristic-only. LLM keys are for bug-fix and code-review.
Copy-paste
GitHub Actions workflow
Save as .github/workflows/diff-scoped-tests.yml
name: Smart test selection (beta)
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
jobs:
test-intel:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODE_AGENT_INSTALL_ID: github-actions:${{ github.repository_id }}
CODE_AGENT_LICENSE_KEY: ${{ secrets.CODE_AGENT_LICENSE_KEY }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: kramlipi/code-agent-action@v0.1.7
id: intel
with:
expert: test-intel
version: code-agent-v0.1.7
verify-cmd: pytest -q
base-branch: ${{ github.base_ref }}
pr: ${{ github.event.pull_request.number }}
emit-ci: "true"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODE_AGENT_INSTALL_ID: github-actions:${{ github.repository_id }}
CODE_AGENT_LICENSE_KEY: ${{ secrets.CODE_AGENT_LICENSE_KEY }}
- run: ${{ steps.intel.outputs.verify_cmd }}
Swap verify-cmd: pytest -q · go test ./… · mvn -q test · npm test · dotnet test · cargo test
Try test-intel on one PR today.
Measure job time before/after. Keep full suite on main.