Page MenuHomePhabricator

[CI] Add `ShellCheck` workflow to GitHub Actions
ClosedPublic

Authored by abosh on Aug 5 2022, 9:06 AM.
Tags
None
Referenced Files
F3559272: D4755.id15375.diff
Fri, Dec 27, 5:49 AM
F3559271: D4755.id15370.diff
Fri, Dec 27, 5:49 AM
Unknown Object (File)
Thu, Dec 26, 4:44 AM
Unknown Object (File)
Wed, Dec 25, 11:09 PM
Unknown Object (File)
Wed, Dec 25, 11:08 PM
Unknown Object (File)
Thu, Dec 19, 12:14 PM
Unknown Object (File)
Thu, Dec 19, 12:14 PM
Unknown Object (File)
Thu, Dec 19, 12:14 PM

Details

Summary

Relevant Linear issue here. Used the example here as inspiration for the YAML file.

Test Plan

Can probably land and see what happens when it first runs, judging off discussion @ashoat and @atul had in D4239.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested changes to this revision.Aug 5 2022, 9:35 AM
atul added inline comments.
.github/workflows/shellcheck.yml
14 ↗(On Diff #15359)

In the past we've tried to avoid using unofficial pre-packaged Actions in our workflows. In this case it looks like the package hasn't been updated in ~1 year. And in general IMO it's good to avoid external dependencies outside of our control when it's easy enough to do so.

I think we should probably just do exactly what we do for the Buildkite job which is:

- 'apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y shellcheck'
- 'shopt -s globstar'
- 'shellcheck -x -P SCRIPTDIR **/*.sh'
This revision now requires changes to proceed.Aug 5 2022, 9:35 AM
abosh added inline comments.
.github/workflows/shellcheck.yml
14 ↗(On Diff #15359)

Ok, that makes sense.

abosh marked an inline comment as done.

Use commands we run in Buildkite job instead of unofficial pre-packaged GitHub Action, per @atul's feedback.

Remove quotes around "Install ShellCheck" command.

Let's land it and see what happens!

This revision is now accepted and ready to land.Aug 5 2022, 11:30 AM
This revision is now accepted and ready to land.Aug 5 2022, 11:41 AM

Add sudo to apt-get commands.

This revision is now accepted and ready to land.Aug 5 2022, 11:44 AM
This revision was landed with ongoing or failed builds.Aug 5 2022, 11:55 AM
This revision was automatically updated to reflect the committed changes.