Skip to content
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 shellcheck and actionlint #5804

Merged
merged 4 commits into from
May 16, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Apr 25, 2024

Description

This PR brings pipelines that were first added to CLI (IntersectMBO/cardano-cli#734 and IntersectMBO/cardano-cli#740) to the node. This is also a follow-up of IntersectMBO/cardano-cli#734 (review).

This PR intentionally does not try to make more scripts pass shellcheck nor try to have more pipelines files pass actionlint (except for bumping a version of upload-artifact which is, as stated on actions/upload-artifact#actionsupload-artifact, going to be deleted in June). This can be done in future PRs. The point of this PR is to capture the current state (i.e. a number of shell scripts and pipelines are already being checked) and also to increase the quality of future additions, because the new pipelines will automatically run on newly added shell scripts and pipelines files (since they won't be in the *-exceptions.txt files).

  • shellcheck is the standard linter for shell scripts
  • Same goes for actionlint for GHA workflow files

How to trust this PR

  • Enter the new Nix environment and try shellcheck and actionlint yourself
  • Look at the execution of the new pipelines:

image

image

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/add-shellcheck-and-actionlint-to-ci branch from 9326b56 to a932e55 Compare May 13, 2024 09:39
@smelc smelc marked this pull request as ready for review May 13, 2024 09:55
@smelc smelc requested review from a team as code owners May 13, 2024 09:55
@smelc smelc force-pushed the smelc/add-shellcheck-and-actionlint-to-ci branch 3 times, most recently from 0c52974 to 68b800e Compare May 15, 2024 09:09
Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

Nice work! Are we planning to remove *-exceptions.txt files at some point in the future?

@@ -48,6 +48,7 @@ let
ghcid
haskell-language-server
cabal
shellcheck
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems that actionlint is a available in nixpkgs, so maybe it would be better to add it here instead of manual download step in a workflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hum yeah I had missed that actionlint is in nixpkgs 🤦

I added it to the dev shell and removed the custom installation from the workflow 👍

.github/workflows/shellcheck.yml Outdated Show resolved Hide resolved
@smelc smelc force-pushed the smelc/add-shellcheck-and-actionlint-to-ci branch from 68b800e to 8f7682b Compare May 15, 2024 12:12
@smelc smelc force-pushed the smelc/add-shellcheck-and-actionlint-to-ci branch from 8f7682b to 637c9dd Compare May 15, 2024 12:15
@smelc smelc enabled auto-merge May 15, 2024 12:17
@smelc
Copy link
Contributor Author

smelc commented May 15, 2024

Are we planning to remove *-exceptions.txt files at some point in the future?

@carbolymer> this is not for me to take this decision but it's a desirable goal in the long run 🙂

cc @angerman (if you happen to be the one that can nudge this forward!?)

@smelc smelc added this pull request to the merge queue May 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 15, 2024
@smelc smelc added this pull request to the merge queue May 16, 2024
Merged via the queue into master with commit 549d015 May 16, 2024
24 checks passed
@smelc smelc deleted the smelc/add-shellcheck-and-actionlint-to-ci branch May 16, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants