feat(e2e): script and CI job to use AI for e2e test selection#20372
feat(e2e): script and CI job to use AI for e2e test selection#20372
Conversation
- Added reusable GitHub Actions workflow for reporting E2E test results. - Created documentation for the AI E2E Testing system, detailing architecture and usage. - Introduced AI E2E Tag Selector script to analyze code changes and select relevant tests. - Updated E2E tags module to export tags for AI analysis. - Added README for smart E2E test selection with local and CI usage instructions.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
|
@SocketSecurity ignore @anthropic-ai/sdk |
…r AI E2E script compilation
|
@SocketSecurity ignore npm/@anthropic-ai/sdk@0.63.1 |
racitores
left a comment
There was a problem hiding this comment.
Nice to see AI stuff in the pipelines
| env: | ||
| E2E_CLAUDE_API_KEY: ${{ secrets.E2E_CLAUDE_API_KEY }} | ||
| run: | | ||
| echo "🤖 Running AI analysis..." |
There was a problem hiding this comment.
I'd move this code to a script maybe?
This comment was marked as spam.
This comment was marked as spam.
.github/scripts/ai-e2e-analysis.sh
Outdated
There was a problem hiding this comment.
we need to convert this file to either python or .mjs. No .sh files please.
…ify command usage
- Moved related files under /e2e - Updated the package.json to correct the path for the AI E2E script. - Removed the outdated README file for the local AI E2E test selector script.
|
Qbandev
left a comment
There was a problem hiding this comment.
Why is this file e2e/scripts/ai-e2e-testing.md in the script folder and not in the docs?



Description
This PR introduces an E2E test selection system that uses AI to analyse files changed and automatically run only the most relevant smoke tests, reducing CI time.
How It Works
Key Features
Usage
For PRs:
AI Analysis is now integrated into main CI and will run on every pull request with recommendations. (Actual test running will be in a different PR)
For local testing:
See
ai-e2e-testing.mdfor complete details.Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds Claude-driven E2E test tag selection with a CI analysis job that outputs a test matrix, plus supporting scripts, docs, and dependencies.
.github/actions/ai-e2e-analysisto run AI analysis, set outputs (test_matrix), and optionally comment on PRs.ai-e2e-analysisjob in.github/workflows/ci.ymlconsumingneeds_e2e_buildchanged files and exposingtest-matrixoutput.e2e/scripts/ai-e2e-tags-selector.tsusing@anthropic-ai/sdkwithesbuild-registerto choose smoketags, count test files, and recommend splits with JSON output..github/scripts/ai-e2e-analysis.mjsto execute the selector, parse results, and write GitHub Action outputs/summary.e2e/scripts/ai-e2e-testing.mdexplaining usage and options.package.jsonwithai-e2escript and dev deps@anthropic-ai/sdk,esbuild,esbuild-register; updateslavamoat.allowScriptsand resolutions accordingly..depcheckrc.ymlignores and.eslintignorefor new files.tagsfrome2e/tags.js.Written by Cursor Bugbot for commit b4953f1. This will update automatically on new commits. Configure here.