Skip to content

[skip changelog] Run CI workflows that are useful to contributors on pushes to any branch #887

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 2 commits into from
Aug 3, 2020
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 2, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce?

Feature.

  • What is the current behavior?

Contributors should run CI in their feature branch to make sure it's passing before submitting a PR. However, the CI workflows are configured to run only on pushes to the master branch, meaning that contributors need to modify the workflows just to get them to run on a feature branch. It's very unlikely that a contributor would do that, so they are more likely to just submit the PR, then if CI on the PR fails push fixup commits until CI is passing.

  • What is the new behavior?

Workflows that are useful to contributors are configured to be triggered by pushes to any branch.

The docs workflow had two distinct uses:

  • Check that changes to docs don't break the static website build system
  • Publish the docs to the website

Only the first use is of interest to contributors, so it was easiest to split that workflow into two, and only configure the validation workflow to run on pushes to any branch.

  • Does this PR introduce a breaking change?

No

  • Other information:

The current test workflow fails when run in a fork, which will be more likely to occur after the change made in this PR. That issue is fixed by #886

per1234 added 2 commits August 3, 2020 12:52
The docs workflow had two uses:

- Check that changes to docs don't break the static website build system
- Publish the docs to the website

To make the CI system friendly to contributors, it should be easy for them to validate documentation changes from a feature branch, meaning the validation aspect should run on a push to any branch. However, the special behavior of the workflow to publish on pushes conflicted with that usage. The most simple solution is to split the workflow into two. The validation workflow contains the process of interest to contributors, and is thus made friendly to their development process. The publishing workflow is not of interest to contributors, and thus doesn't need to be configured to run on pushes to any branch.
Contributors should run CI in their feature branch to make sure it's passing before submitting a PR. Previously, the CI workflows were configured to run only on push to the master branch, meaning that contributors would need to modify the workflows just to get them to run on a feature branch. It's very unlikely that a contributor would do that, so they are more likely to just submit the PR, then if CI on the PR fails push fixup commits until CI is passing.

The solution is simply to remove the filters that caused the workflows to run only on push to master.
@per1234 per1234 merged commit 466c8c2 into arduino:master Aug 3, 2020
@per1234 per1234 deleted the ci-in-branches branch August 3, 2020 20:19
@per1234 per1234 self-assigned this Nov 23, 2021
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.

2 participants