feat: skip workflows on copilot/*, dependabot/*, and pre-commit-ci-update-config branches #538
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 implements branch exclusions for GitHub workflows to avoid duplicate CI runs on bot-created branches. When bots like Copilot, Dependabot, or pre-commit-ci create branches and open PRs, the workflows run twice - once on the push event and once on the pull request event.
Changes Made
Modified the following workflow files to exclude bot branches from push events while preserving pull request triggers:
test.yml
- Python package testing across multiple Python versions and platformsmachines.yml
- Testing on different machine configurations (Slurm, PBS, SSH)pyright.yml
- Type checking with pyrighttest-bohrium.yml
- Bohrium cloud platform testingrelease.yml
- PyPI release workflowEach workflow now uses:
Workflows Intentionally Preserved
mirror_gitee.yml
- Preserved to ensure all commits (including from bot branches) are properly mirrored to Giteeci-docker.yml
andpublish_conda.yml
- Only run on tags, so already filteredcopilot-setup-steps.yml
- Only runs on specific path changesTesting
This change reduces unnecessary CI resource usage while maintaining full coverage for legitimate code changes and PRs.
Fixes #537.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
39.106.xx.xx
python -m coverage run -p --source=./dpdispatcher -m unittest discover -s tests -p test_*.py -v
(dns block)python -m coverage run -p --source=./dpdispatcher -m unittest -v
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.