-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(ci): add test impact analysis for selective test execution #9844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Alan-TheGentleman
wants to merge
5
commits into
master
Choose a base branch
from
feat/test-impact-analysis
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Add test-impact.yml config mapping paths to test patterns - Add test-impact.py script to analyze changed files - Add reusable test-impact-analysis.yml workflow - Add ui-e2e-tests-v2.yml as optimized E2E workflow example This enables running only relevant tests based on changed files: - Critical paths (lib, config, models) run ALL tests - Module paths run only mapped tests - Side effects detected (e.g., API serializers trigger UI E2E) Testing: Added dummy change to ui/components/providers to verify the analysis correctly identifies ui/tests/providers/** as target.
Contributor
|
Please add an entry to the corresponding |
Contributor
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Contributor
🔒 Container Security ScanImage: ✅ No Vulnerabilities DetectedThe container image passed all security checks. No known CVEs were found.📋 Resources:
|
- Remove deprecated ::set-output format from debug output - Revert dummy change to ui/components/providers/index.ts - Re-enable .github/** as critical path
Testing that auth changes only trigger sign-in and sign-up E2E tests
Files matching ignored patterns (docs, markdown, configs, examples) will not trigger any tests, saving CI resources.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
github_actions
Pull requests that update GitHub Actions code
no-changelog
Skip including change in changelog/release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Optimizes CI by running only relevant tests based on changed files, reducing feedback time for developers.
Jira: PROWLER-738
Description
Adds a test impact analysis system that determines which tests to run based on changed files.
How It Works
Ignored Paths (skip ALL tests): Changes to docs, configs, and non-code files
docs/**,*.md,examples/**,contrib/**,skills/**.gitignore,.editorconfig,LICENSE,CODEOWNERS.vscode/**,.idea/**)Critical Paths (run ALL tests): Changes to foundational code trigger full test suite
prowler/lib/**,prowler/config/**,prowler/exceptions/**api/src/backend/api/models.py,api/src/backend/config/**ui/lib/**,ui/types/**,ui/config/**.github/workflows/**Module Paths (run targeted tests): Changes to specific modules run only related tests
prowler/providers/aws/**tests/providers/aws/**ui/components/providers/**ui/tests/providers/**ui/components/auth/**ui/tests/sign-in/** ui/tests/sign-up/**api/v1/serializers.pySide Effects Detection: API serializer/view changes trigger UI E2E tests
Files Added
.github/test-impact.yml.github/scripts/test-impact.py.github/workflows/test-impact-analysis.yml.github/workflows/ui-e2e-tests-v2.ymlBenchmark Results
Tested on this PR with different change scenarios:
Test 1: Provider component changes (
ui/components/providers/)providers/**onlyTest 2: Auth component changes (
ui/components/auth/)sign-in/** sign-up/**onlyTest 3: Docs-only changes (
docs/**,*.md)Steps to review
.github/test-impact.ymlfor correct path → test mappings.github/scripts/test-impact.pyfor analysis logicChecklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.