Skip to content

Commit

Permalink
ci: add QA for shell scripts
Browse files Browse the repository at this point in the history
In commit 3eae968 ("tools: add build_firmware.sh providing firmware
build functionality") new build_firmware.sh shell script was added, so
lets keep the code quality with reviewdog's shfmt and shellcheck based
GitHub actions.

Signed-off-by: Petr Štetiar <[email protected]>
  • Loading branch information
ynezz committed Dec 8, 2024
1 parent 4995ab5 commit 750b0f2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: reviewdog / shellscripts

on:
push:
paths:
- tools/build_firmware.sh

pull_request:
paths:
- tools/build_firmware.sh

jobs:

shellcheck:
name: Check shell scripts with shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
reporter: github-pr-review
path: tools
pattern: "*.sh"

shfmt:
name: Check shell scripts with shfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-shfmt@v1
with:
level: warning
shfmt_flags: '-i 0 '

0 comments on commit 750b0f2

Please sign in to comment.