-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enable perlcritic checks in CI #31
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: ybonatakis <ybonatakis@suse.com>
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: yamllint | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: registry.opensuse.org/devel/openqa/containers/os-autoinst_dev | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Validate yamls | ||
run: | | ||
git config --global --add safe.directory '*' | ||
yamllint --strict $(git ls-files "*.yml" "*.yaml" 2> /dev/null || find . -name '*.y*ml') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yamllint actually has a configuration file where you can specify the matching glob, and by default it will match .yaml and .yml. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
external/os-autoinst-common/.yamllint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this change related to perlcritic checks?
Is the switch from podman to docker intended? I thought podman is the preferred way.
Also, you probably do not want the exit in subshell and rather use
grep ok || { echo "$err_msg" && exit 1; }