-
Notifications
You must be signed in to change notification settings - Fork 550
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
ci: Add a github actions workflow for lint #1257
base: main
Are you sure you want to change the base?
Conversation
9a08129
to
be9bc85
Compare
.github/workflows/lint.yml
Outdated
if [[ -n $(git status --porcelain) ]]; then | ||
echo "There are unformatted files." | ||
exit 1 | ||
else | ||
echo "All files are properly formatted." | ||
fi |
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.
Perhaps it's better to replace this with git diff --exit-code
, which will show what's wrong and make the CI fail, too.
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.
Signed-off-by: utam0k <[email protected]>
@kolyshkin PTAL 🙏 |
runs-on: ubuntu-latest | ||
env: | ||
# We need jq +1.7 because of jqlang/jq#1741. | ||
JQ_VERSION: '1.7' |
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.
According to https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md, ubuntu-24.04 has jq 1.7.1-3build1, so we can just use ubuntu-24.04 here and skip jq upgrade step.
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.
one nit; lgtm otherwise
In order to prevent like #1255
It works fine: https://github.com/utam0k/runtime-spec/actions/runs/9534058439/job/26278029545