-
Notifications
You must be signed in to change notification settings - Fork 741
ci
: Add shellcheck step to lint job
#2650
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
Conversation
e8ad336
to
afdd091
Compare
if [[ "${SYSTEM_VERSION}" == "${VERSION}" ]]; then | ||
SHELLCHECK=shellcheck | ||
else | ||
SHELLCHECK="${REPO_ROOT}/build/shellcheck" |
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.
Not entirely convinced this is the best location. I'm also not a huge fan of running directly from /tmp (as per ANR). Suggested alternatives?
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.
$REPO_ROOT/tmp?
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.
I think build is reasonable... It's where we put the rest of our binaries right now... and it's ignored accordingly already
@@ -60,4 +60,4 @@ fi | |||
|
|||
################################# | |||
# - Execute in random order to identify unwanted dependency | |||
ginkgo -p -v --randomize-all ./tests/e2e/e2e.test -- ${E2E_ARGS} "${@}" | |||
ginkgo ${GINKGO_ARGS} -v --randomize-all ./tests/e2e/e2e.test -- "${E2E_ARGS[@]}" "${@}" |
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.
This is a fix right? previously we just always ran in parallel right?
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.
Yes, I tried to make the parallelism conditional but failed :/
Though maybe this is no longer required due to using a smaller shared network (2 vs 5 nodes)?
#lintallthethings!
We lint code, why not shell scripts? In addition to simplifying the avoidance of common shell errors, the shellcheck wiki has lots of documentation for all the error types it checks for.
Testing
In addition to CI, local testing on arm64 linux and macos verified the logic for downloading and using a local (vs a system-wide) shellcheck.