Skip to content

Commit e64e4cb

Browse files
workflows: add a check rule
Based on the recently added `make check`. Signed-off-by: John Mulligan <[email protected]>
1 parent fd0a393 commit e64e4cb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/container-image.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@ on:
88

99
jobs:
1010

11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
# We need a newer version of shellcheck to avoid problems with the
16+
# relative imports. Our scripts work on v0.7.2 and up but not the
17+
# v0.7.0 preinstalled in the ubutnu image
18+
- name: Update shellcheck
19+
run: |
20+
shellcheck_version="v0.8.0"
21+
url="https://github.com/koalaman/shellcheck/releases/download/${shellcheck_version}/shellcheck-${shellcheck_version}.linux.x86_64.tar.xz"
22+
curl -Lo /tmp/shellcheck.tar.xz "$url"
23+
mkdir /tmp/shellcheck
24+
tar -xf /tmp/shellcheck.tar.xz -C /tmp/shellcheck
25+
mkdir -p ~/bin
26+
install -m0755 /tmp/shellcheck/shellcheck-${shellcheck_version}/shellcheck ~/bin/shellcheck
27+
- name: Show shellcheck version
28+
run: $HOME/bin/shellcheck --version
29+
- name: Run static check tools
30+
run: make check SHELLCHECK=$HOME/bin/shellcheck
31+
1132
build-server:
1233
runs-on: ubuntu-latest
1334
env:

0 commit comments

Comments
 (0)