-
Notifications
You must be signed in to change notification settings - Fork 2.5k
48 lines (41 loc) · 1.11 KB
/
code-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Code Lint
on:
pull_request:
branches: [master, 'release/**']
paths-ignore:
- 'docs/**'
- '**/*.md'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/[email protected]
- name: Install
run: |
. ./ci/common.sh
export_or_prefix
export OPENRESTY_VERSION=default
./ci/linux-install-openresty.sh
./utils/linux-install-luarocks.sh
sudo luarocks install luacheck
- name: Script
run: |
. ./ci/common.sh
export_or_prefix
make lint
sc-lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Shellcheck code
run: |
scversion="latest"
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
cp -av "shellcheck-${scversion}/shellcheck" /usr/local/bin/
shellcheck --version
git ls-files -- "*.sh" | xargs -t shellcheck