Refactor cleanup to separate clean.sh script and add clean job to e2e.yml workflow#250
Merged
Merged
Conversation
Collaborator
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] - make cleaning of test resources optional in the e2e.sh script
- add logging"--clean" flag to enable, default is false.
- add logging for cleaned resources
Add optional cleanup with --clean flag and enhanced logging to e2e.sh
Sep 22, 2025
….yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
I've implemented all the requested changes in commit 46bb965:
The cleanup is now completely separated from the test logic, running as a prerequisite CI job. The |
Copilot
AI
changed the title
Add optional cleanup with --clean flag and enhanced logging to e2e.sh
Refactor cleanup to separate clean.sh script and add clean job to e2e.yml workflow
Sep 22, 2025
pelikhan
approved these changes
Sep 22, 2025
|
Closed by e2e test cleanup |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR refactors test resource cleanup by moving it from the e2e.sh script to a dedicated clean.sh script and integrating it as a prerequisite job in the CI workflow, addressing safety concerns and improving separation of concerns.
Problem
The e2e.sh script previously performed cleanup of test resources (closing issues, PRs, deleting branches) by default on every run. This could be problematic when:
Solution
Refactored the cleanup functionality into a separate script and CI job:
Key Changes
1. Separate
clean.shScript2. Updated CI Workflow (
e2e.yml)cleanjob that runs before all e2e testsclean.shwith proper GitHub CLI authentication3. Simplified
e2e.sh--cleanflag4. Enhanced Logging
The cleanup script provides detailed logging for transparency:
Workflow Changes
Before: E2E tests handled their own cleanup optionally
After: Dedicated cleanup job runs before all tests automatically
This ensures:
Testing
All functionality has been verified:
clean.shscript syntax and functionality validatede2e.shcleanup code properly removed and--cleanflag rejected✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.