Add Shell check CI testing (#2033)

* using bash-based shellcheck instead of GitHub Marketplace action
* add color shellcheck option
This commit is contained in:
lanefu
2020-06-17 21:48:22 -04:00
committed by GitHub
parent d431797399
commit 176b7318f6

View File

@@ -1,9 +1,21 @@
name: build pr kernel
name: test pull request
# This workflow is triggered on pushes to the repository.
on: [pull_request]
jobs:
build:
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Environment variables
run: sudo -E bash -c set
- name: Install required packages
run: sudo apt-get install shellcheck
- name: "lint libraries via shellcheck"
run: shellcheck --color -x -s bash lib/*.sh && echo "shellcheck lib/*.sh - OK";
build_sbc_kernel:
name: Compile changed kernel
# This job runs on self hosted Linux machine, with public label
runs-on: [self-hosted, public]
@@ -11,6 +23,9 @@ jobs:
# - uses: rokroskar/workflow-run-cleanup-action@v0.2.2
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: fix sudo ownership
run: |
sudo chown -R $(whoami) build
- uses: actions/checkout@v2
with:
fetch-depth: 0