Skip to content

Limit CI workflows to main branch pushes#13

Merged
messa merged 1 commit intomainfrom
claude/fix-duplicate-test-runs-u2E3u
Jan 26, 2026
Merged

Limit CI workflows to main branch pushes#13
messa merged 1 commit intomainfrom
claude/fix-duplicate-test-runs-u2E3u

Conversation

@messa
Copy link
Owner

@messa messa commented Jan 26, 2026

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

  • Modified .github/workflows/test-with-uv.yml to restrict push triggers to the main branch only
  • Modified .github/workflows/test.yml to restrict push triggers to the main branch only
  • Pull request triggers remain unchanged and will continue to run on all PRs

Details

The workflow trigger configuration was changed from a compact array syntax on: [push, pull_request] to an expanded object syntax that allows branch filtering:

  • Push events now only trigger when changes are pushed to main
  • Pull request events continue to trigger for all PRs regardless of target branch

This 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.

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
Copilot AI review requested due to automatic review settings January 26, 2026 19:27
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.57%. Comparing base (f0e4d80) to head (9fac7f5).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +3 to +6
on:
push:
branches: [main]
pull_request:
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@messa messa merged commit bb48880 into main Jan 26, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants