Skip to content

ci: optimize CI workflow with path filtering #775

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

Merged
merged 12 commits into from
Aug 8, 2025
Merged

Conversation

grdsdev
Copy link
Collaborator

@grdsdev grdsdev commented Aug 8, 2025

Summary

  • Add intelligent path filtering to CI workflow to only run when files that could impact the build are changed
  • Prevents unnecessary CI runs for documentation changes, README updates, or other non-code modifications
  • Ensures all impactful changes still trigger the build properly

Changes

The CI workflow now only runs when these file patterns change:

  • Source code: Sources/**, Tests/**, Examples/**, *.swift
  • Package management: Package.swift, Package.resolved, .swiftpm/**
  • Build configuration: Makefile, *.xcodeproj/**, *.xcworkspace/**
  • CI itself: .github/workflows/ci.yml

Test plan

  • Verify workflow syntax is valid
  • Test that CI runs when source files are changed
  • Test that CI is skipped when only documentation is changed

🤖 Generated with Claude Code

@grdsdev grdsdev force-pushed the test-release-workflow branch from 7314484 to f581a6a Compare August 8, 2025 10:43
@grdsdev grdsdev changed the title Test release workflow test: release workflow Aug 8, 2025
@grdsdev grdsdev force-pushed the test-release-workflow branch from f581a6a to f8ec4f7 Compare August 8, 2025 12:51
@grdsdev grdsdev changed the title test: release workflow ci: remove wait for status step from release workflow Aug 8, 2025
@grdsdev grdsdev marked this pull request as ready for review August 8, 2025 13:06
Add intelligent path filtering to CI workflow to only run when files that could
impact the build are changed. This includes source code, tests, examples, package
configuration, build files, and CI configuration itself.

This optimization reduces unnecessary CI runs for documentation changes, README
updates, or other non-code modifications while ensuring all impactful changes
trigger the build.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@grdsdev grdsdev changed the title ci: remove wait for status step from release workflow feat(ci): optimize CI workflow with path filtering Aug 8, 2025
@grdsdev grdsdev changed the title feat(ci): optimize CI workflow with path filtering ci: optimize CI workflow with path filtering Aug 8, 2025
@grdsdev grdsdev requested review from mandarini and o-santi August 8, 2025 13:11
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16828429714

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.442%

Totals Coverage Status
Change from base Build 16827526401: 0.0%
Covered Lines: 5517
Relevant Lines: 7124

💛 - Coveralls

@grdsdev grdsdev enabled auto-merge (squash) August 8, 2025 16:34
Copy link

@o-santi o-santi left a comment

Choose a reason for hiding this comment

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

Approved with small nitpicks.

Comment on lines +11 to +12
- '*.swift'
- 'Package.swift'
Copy link

Choose a reason for hiding this comment

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

Doesn't *.swift cover Package.swift? Do we need to be redundant here?

- 'Makefile'
- '*.xcodeproj/**'
- '*.xcworkspace/**'
- '.swiftpm/**'
Copy link

Choose a reason for hiding this comment

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

What about package.json? I know it is for tooling but we might want to run CI on changes for it.

@grdsdev grdsdev merged commit 347f61e into main Aug 8, 2025
22 checks passed
@grdsdev grdsdev deleted the test-release-workflow branch August 8, 2025 17:50
@grdsdev
Copy link
Collaborator Author

grdsdev commented Aug 8, 2025

Thanks for the approval @o-santi it automatically merged, I'll include those feedbacks in the next PR.

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