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

GH Actions: run workflows more selectively #131

Merged
merged 1 commit into from
May 24, 2023

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented May 14, 2023

Only run the workflows when there is a chance that the result of the workflow run will be different from before.

The path selection is set up to cast a wide net to make the risk of the workflows not running when the build could potentially break as small as possible.

This means that, aside from files of the type being checked in the workflow changing, the workflow will also run when:

  • The configuration used changes.
  • Dependencies used in the workflow may potentially have changed.
  • Composer scripts used in the workflow may potentially have changed.
  • Shell scripts used in the workflow have changed.
  • The workflow itself changes.
  • Miscellaneous related files have changed.

Note: the lists of files may include some files which don't currently exist in the repo (like .eslintignore) for consistency across workflows and to prevent issues if/when such file(s) would be introduced to the repo.

Also note that, as this repo does not contain a committed composer.lock file, the path selection is done via paths-ignore instead of via paths!

Only run the workflows when there is a chance that the result of the workflow run will be different from before.

The path selection is set up to cast a wide net to make the risk of the workflows not running when the build could potentially break as small as possible.

This means that, aside from files of the type being checked in the workflow changing, the workflow will also run when:
* The configuration used changes.
* Dependencies used in the workflow may potentially have changed.
* Composer scripts used in the workflow may potentially have changed.
* Shell scripts used in the workflow have changed.
* The workflow itself changes.
* Miscellaneous related files have changed.

Note: the lists of files _may_ include some files which don't currently exist in the repo (like `.eslintignore`) for consistency across workflows and to prevent issues if/when such file(s) would be introduced to the repo.

Also note that, as this repo does not contain a committed `composer.lock` file, the path selection is done via `paths-ignore` instead of via `paths`!
@jrfnl jrfnl added this to the 1.x Next Release milestone May 14, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4971043073

  • 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 22.609%

Totals Coverage Status
Change from base Build 4971027474: 0.0%
Covered Lines: 52
Relevant Lines: 230

💛 - Coveralls

Copy link
Contributor

@noud-github noud-github left a comment

Choose a reason for hiding this comment

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

looks good to me

@noud-github noud-github merged commit e2660e9 into main May 24, 2023
@noud-github noud-github deleted the JRF/ghactions-run-more-selectively branch May 24, 2023 08:14
@enricobattocchi enricobattocchi modified the milestones: 1.x Next Release, 2.0 Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants