Page MenuHomePhabricator

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

Authored by abosh on Aug 5 2022, 9:06 AM.
Tags
None
Referenced Files
F3370238: D4755.diff
Tue, Nov 26, 1:34 AM
Unknown Object (File)
Sat, Nov 2, 3:05 PM
Unknown Object (File)
Oct 8 2024, 9:22 PM
Unknown Object (File)
Oct 8 2024, 7:59 AM
Unknown Object (File)
Oct 8 2024, 7:59 AM
Unknown Object (File)
Oct 7 2024, 11:14 PM
Unknown Object (File)
Oct 7 2024, 11:14 PM
Unknown Object (File)
Oct 7 2024, 11: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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

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.