Skip to content

Conversation

@garotm
Copy link
Member

@garotm garotm commented Jan 4, 2025

Thank you! Yes, the path filtering in the workflow configuration is a deliberate optimization to:

  1. Only run CI when relevant files change:
# ios
paths:
  - 'ios/**'                     # Only when iOS code changes
  - '.github/workflows/ios.yml'  # Or when the workflow itself changes

# android
paths:
  - 'android/**'                     # Only when android code changes
  - '.github/workflows/android.yml'  # Or when the workflow itself changes

# python
paths:
  - 'backend/**'                     # Only when python code changes
  - '.github/workflows/build.yml'    # Or when the workflow itself changes
  - 'requirements*.txt'              # Or when the package requirements change
  1. Save GitHub Actions minutes by not running unnecessary builds
  2. Speed up PR merges by only running relevant checks

This is particularly useful in a monorepo structure like RunOn where we have:

  • iOS frontend
  • Backend Python code
  • Android code (future)
  • Infrastructure code

Each component has its specific workflow that only triggers when relevant files change. This way:

  • Backend changes don't trigger iOS builds
  • iOS changes don't trigger backend tests
  • Each component can be developed independently
  • CI/CD resources are used efficiently

@garotm garotm requested a review from a team January 4, 2025 01:13
@garotm garotm self-assigned this Jan 4, 2025
@garotm garotm added the enhancement New feature or request label Jan 4, 2025
@garotm garotm added this to the MVP milestone Jan 4, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 4, 2025

@garotm garotm merged commit f10cc95 into main Jan 4, 2025
5 checks passed
@garotm garotm deleted the feature/ci-path-filtering branch January 4, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants