2020-08-17 14:46:52 +00:00
|
|
|
name: CI
|
2020-08-17 14:49:09 +00:00
|
|
|
on: [push, pull_request]
|
2020-08-17 14:46:52 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
formatCheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Shellcheck
|
|
|
|
run: sudo apt-get install -y shellcheck
|
|
|
|
- name: DoShellcheck
|
|
|
|
run: shellcheck -V && shellcheck -e SC2181 **/*.sh && echo "shellcheck OK"
|
|
|
|
- name: Install shfmt
|
|
|
|
with:
|
2020-08-17 14:50:19 +00:00
|
|
|
SHFMT_URL: "https://github.com/mvdan/sh/releases/download/v3.1.2/shfmt_v3.1.2_linux_amd64"
|
2020-08-17 14:46:52 +00:00
|
|
|
run: curl -sSL ${{ SHFMT_URL }} -o ~/shfmt && chmod +x ~/shfmt
|
|
|
|
- name: shfmt
|
|
|
|
run: ~/shfmt -l -w -i 2 . ; git diff --exit-code && echo "shfmt OK"
|