From cfc1388bb787200fc0e07326fb67103f29f29123 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 1 Jan 2020 00:27:36 -0500 Subject: [PATCH] chore: Switch shfmt and shellcheck builds to GitHub Actions --- .github/workflows/shfmt.yml | 20 ++++++++++++++++++++ .travis.yml | 11 ----------- travis.yml.template | 11 ----------- 3 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/shfmt.yml diff --git a/.github/workflows/shfmt.yml b/.github/workflows/shfmt.yml new file mode 100644 index 00000000..1427dd1c --- /dev/null +++ b/.github/workflows/shfmt.yml @@ -0,0 +1,20 @@ +name: Check Shell scripts + +on: + pull_request: + paths: + - "**/*.sh" + +jobs: + shfmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: docker run -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci . + - run: git diff --color --exit-code + + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: shellcheck *.sh diff --git a/.travis.yml b/.travis.yml index b24fcc6e..03f1caa9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,17 +57,6 @@ jobs: script: - find . -name "*.md" | xargs -n 1 markdown-link-check - - stage: Test - name: shfmt check - script: - - docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci . - - git diff --color - - git diff --stat=220 --color --exit-code - - - stage: Test - name: Shell Check - script: shellcheck *.sh - - stage: Test name: .travis.yml and travis.yml.template consistency script: diff --git a/travis.yml.template b/travis.yml.template index edff5609..f13b6008 100644 --- a/travis.yml.template +++ b/travis.yml.template @@ -55,17 +55,6 @@ jobs: script: - find . -name "*.md" | xargs -n 1 markdown-link-check - - stage: Test - name: shfmt check - script: - - docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci . - - git diff --color - - git diff --stat=220 --color --exit-code - - - stage: Test - name: Shell Check - script: shellcheck *.sh - - stage: Test name: .travis.yml and travis.yml.template consistency script: