Skip to content
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

build: execute CI workflows based on which files are modified #2065

Merged
merged 18 commits into from
May 24, 2023

Conversation

morrisonlevi
Copy link
Collaborator

@morrisonlevi morrisonlevi commented May 19, 2023

Description

This uses CircleCI's dynamic configuration to execute specific workflows based on which files are modified. It does this by comparing the changed files to the master branch, so in a stacked PR scenario, you may run more tests than you expect.

The build and build_packages workflows are on by default, and currently no rules disable them. The workflows which are enabled this way are:

  • components
  • zend_abstract_interface
  • profiling (new, this is just the profiling tests extracted to a workflow so they can be conditionally run and tracked individually)

Note that the eclint job is broken when ran from a CircleCI continuation because of the gulp-reporter, which hard-codes the configuration as .circleci/config.yml, which is broken by using .circleci/continue_config.yml. It seems eclint is unmaintained, and has been for around 5 years now. We could copy the lint job to the main workflow if we want, or we could drop the eclint check instead. For now I have removed it.

These PRs demonstrate the filters work correctly for the relevant workflows (but disabled the build workflows to save credits, as they aren't needed).

Readiness checklist

  • Changelog has been added to the release document.
  • Tests added for this feature/bug. Draft PRs test the job continuations, but this just a one time test.

Reviewer checklist

  • Appropriate labels assigned.
  • Milestone is set.

@morrisonlevi morrisonlevi added this to the 0.88.0 milestone May 19, 2023
@morrisonlevi morrisonlevi marked this pull request as ready for review May 22, 2023 14:55
@morrisonlevi morrisonlevi requested a review from a team as a code owner May 22, 2023 14:55
Copy link
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

Trusting that it's working, and the pipeline conditions seem sensible.

@morrisonlevi morrisonlevi merged commit 6cf73bd into master May 24, 2023
@morrisonlevi morrisonlevi deleted the levi/ci-filtering branch May 24, 2023 02:20
@morrisonlevi morrisonlevi changed the title build(ci): execute workflows based on which files are modified build: execute workflows based on which files are modified May 24, 2023
@morrisonlevi morrisonlevi changed the title build: execute workflows based on which files are modified build: execute CI workflows based on which files are modified May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants