Skip to content

Commit cfc1388

Browse files
committed
chore: Switch shfmt and shellcheck builds to GitHub Actions
1 parent 24fcebb commit cfc1388

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

.github/workflows/shfmt.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check Shell scripts
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**/*.sh"
7+
8+
jobs:
9+
shfmt:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- run: docker run -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci .
14+
- run: git diff --color --exit-code
15+
16+
shellcheck:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v1
20+
- run: shellcheck *.sh

.travis.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,6 @@ jobs:
5757
script:
5858
- find . -name "*.md" | xargs -n 1 markdown-link-check
5959

60-
- stage: Test
61-
name: shfmt check
62-
script:
63-
- docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci .
64-
- git diff --color
65-
- git diff --stat=220 --color --exit-code
66-
67-
- stage: Test
68-
name: Shell Check
69-
script: shellcheck *.sh
70-
7160
- stage: Test
7261
name: .travis.yml and travis.yml.template consistency
7362
script:

travis.yml.template

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,6 @@ jobs:
5555
script:
5656
- find . -name "*.md" | xargs -n 1 markdown-link-check
5757

58-
- stage: Test
59-
name: shfmt check
60-
script:
61-
- docker run -it --rm -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci .
62-
- git diff --color
63-
- git diff --stat=220 --color --exit-code
64-
65-
- stage: Test
66-
name: Shell Check
67-
script: shellcheck *.sh
68-
6958
- stage: Test
7059
name: .travis.yml and travis.yml.template consistency
7160
script:

0 commit comments

Comments
 (0)