Conversation
Limit push trigger to main branch only. This prevents tests from running twice (once for push, once for pull_request) when pushing to PR branches. https://claude.ai/code/session_013h4SmDZc9PUGNMprvcQdR7
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
=====================================
Coverage 6.57% 6.57%
=====================================
Files 1 1
Lines 608 608
=====================================
Hits 40 40
Misses 568 568 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR optimizes CI workflow triggers to reduce unnecessary builds on feature branches. The workflows now only run on pushes to the main branch while continuing to run on all pull requests, which maintains test coverage while reducing CI resource usage.
Changes:
- Modified workflow trigger configuration from compact array syntax to expanded object syntax with branch filtering
- Push events now restricted to main branch only for all test workflows
- Pull request triggers remain unchanged
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/test.yml |
Updated to run on push to main and all PRs |
.github/workflows/test-with-uv.yml |
Updated to run on push to main and all PRs |
.github/workflows/test-device.yml |
Updated to run on push to main and all PRs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: |
There was a problem hiding this comment.
The PR description only mentions changes to test.yml and test-with-uv.yml, but this file (test-device.yml) was also modified with the same changes. The PR description should be updated to include test-device.yml in the list of modified files.
Summary
Updated GitHub Actions workflows to only run on pushes to the main branch, while continuing to run on all pull requests. This reduces unnecessary CI runs on feature branches while maintaining full test coverage for PRs and main branch updates.
Changes
.github/workflows/test-with-uv.ymlto restrict push triggers to the main branch only.github/workflows/test.ymlto restrict push triggers to the main branch onlyDetails
The workflow trigger configuration was changed from a compact array syntax
on: [push, pull_request]to an expanded object syntax that allows branch filtering:mainThis optimization reduces CI resource usage and clutter in the workflow history while ensuring adequate test coverage for the main development branch and all proposed changes.