Skip to content

Enhance CI system for checking GitHub Actions workflows #6

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 3 commits into from
Apr 12, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Apr 9, 2021

The "Manage PRs" workflow is an essential component of the new Library Manager submission system. This is a quite complex workflow which will cause the users of the submission to have a bad experience if it is not working correctly.

For this reason, it's worth setting up some automated systems to verify the workflows of this repository.

@per1234 per1234 requested review from silvanocerza and umbynos April 9, 2021 15:25
@github-actions github-actions bot added the other label Apr 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2021

Hi @per1234. Your pull request has been detected as something other than a Library Manager submission. A maintainer will need to review it before it can be merged.

If you intended to submit a library, please check the instructions and update your pull request if necessary:
https://github.com/arduino/library-registry/blob/main/README.md#instructions

Comment on lines 75 to 101
find . \
-path './.git' -prune -or \
\( \
\( \
-name '.clang-format' -or \
-name '.clang-tidy' -or \
-name '.gemrc' -or \
-name '*.yml' -or \
-name '*.mir' -or \
-name '*.reek' -or \
-name '*.rviz' -or \
-name '*.sublime-syntax' -or \
-name '*.syntax' -or \
-name '*.yaml' -or \
-name '*.yaml-tmlanguage' -or \
-name '*.yaml.sed' -or \
-name '*.yaml.mysql' \
\) \
-and -type f \
\) \
-exec \
yamllint \
--config-file "${{ github.workspace }}/.github/.yamllint.yml" \
--format ${{ matrix.configuration.format }} \
'{}' + \
|| \
${{ matrix.configuration.fail-command }}

Choose a reason for hiding this comment

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

Couldn't we use the yaml-files config to avoid doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Silvano! That is such a huge improvement to the system:
https://github.com/arduino/library-registry/compare/051008b..0c09834a08711d1c9efd0a9f756bd2fa9c37106e
I guess I missed that feature completely. This will provide consistency for people running yamllint locally and I never enjoy using find.

@silvanocerza
Copy link

I like how we get warnings directly in the code now, this will be really useful.

image

On every push or pull request that affects the repository's GitHub Actions workflows, and periodically, validate them
against the JSON schema.
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2021

Hi @per1234. Your pull request has been detected as something other than a Library Manager submission. A maintainer will need to review it before it can be merged.

If you intended to submit a library, please check the instructions and update your pull request if necessary:
https://github.com/arduino/library-registry/blob/main/README.md#instructions

per1234 added 2 commits April 9, 2021 09:32
On every push and pull request that affects relevant files, and periodically, run yamllint to check the YAML files of
the repository for issues.

The .yamllint.yml file is used to configure yamllint:
https://yamllint.readthedocs.io/en/stable/configuration.html
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2021

Hi @per1234. Your pull request has been detected as something other than a Library Manager submission. A maintainer will need to review it before it can be merged.

If you intended to submit a library, please check the instructions and update your pull request if necessary:
https://github.com/arduino/library-registry/blob/main/README.md#instructions

@per1234
Copy link
Contributor Author

per1234 commented Apr 9, 2021

I like how we get warnings directly in the code now, this will be really useful.

Yeah, it is convenient! I think it will be especially beneficial for casual contributors who won't be so familiar with hunting down the cause of a CI failure in the log.

This is something worth considering when setting up the traditional Tooling Team style taskfile-based CI. In this case it should work either way because yamllint has built-in support. But in most other cases I've seen the problem matcher is implemented in the action, not in the tool (e.g., codespell). I think it is still possible to set that up in the workflow itself. For example, here is an independent problem matcher action I used for markdownlint in the "Check Markdown" workflow:
https://github.com/xt0rted/markdownlint-problem-matcher

@per1234 per1234 merged commit 6c9cf7b into main Apr 12, 2021
@per1234 per1234 deleted the check-workflows branch April 12, 2021 06:27
@rsora rsora added the topic: other Something other than a library list request label Sep 22, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: other Something other than a library list request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants