Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Create GitHub Actions action to run Arduino Lint #1

Merged
merged 14 commits into from
Jan 12, 2021
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jan 12, 2021

No description provided.

In the event of a false positive, the problematic word should be added, in all lowercase, to the `ignore-words-list`
field in ./.codespellrc.
This project is forked from arduino/setup-arduino-cli
This information is of no interest to the user, and thus having it in the user-targeted readme will only have a harmful
effect.
Use a pure YAML formatting style, rather than a mixture of YAML and JSON styles.
This allows the CI system to benefit from ongoing improvements to the actions/setup-node GitHub Actions action, while
avoiding breaking changes.
Unlike the `arduino/setup-arduino-cli` action this was based on, this is a standalone action. So adding the installation
to the system path would only serve to pollute the runner environment.
Recommended practice for GitHub Actions
(https://help.github.com/en/actions/building-actions/about-actions#versioning-your-action) is to add a ref to the
repository for the major version, then update that ref on each release of that major version series. This allows users
of the action to configure their workflows to use the latest version of the action that won't introduce breaking
changes. Without this ref, the only options are:

- pin a fixed ref - this means either frequent maintenance of the workflow to keep it up to date, or more likely using
  an outdated version of the action.
- reference the tip of the default branch, subjecting the workflow to an unstable version of the action which may
  introduce bugs or breaking changes at any moment

Although GitHub recommends using a tag, my understanding is that it's not considered best practices to alter Git tags.
For this reason, I prefer using branch instead of a tag. There is no difference between the two as far as the usage of
the action in a GitHub Workflow is concerned. The commits would be pushed to the branch on every release.

I see GitHub even took the branch approach in one of the official actions:
https://github.com/octokit/request-action

Another prominent action using this approach:
https://github.com/ruby/setup-ruby

And our own (admittedly, I did it):
https://github.com/arduino/setup-protoc
Otherwise, checkout converts the LF line endings to CRLF on the Windows runner, causing the formatting check to fail.
It's best practices to use release versions of the actions unless there is a compelling reason to do otherwise.
Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

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

:shipit:

@per1234 per1234 merged commit 34273a9 into main Jan 12, 2021
@per1234 per1234 deleted the development branch January 12, 2021 16:28
@per1234 per1234 added topic: code Related to content of the project itself topic: documentation Related to documentation for the project type: enhancement Proposed improvement labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
topic: code Related to content of the project itself topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants