This repository was archived by the owner on Sep 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : syntax check
2+
3+ on :
4+ schedule :
5+ - cron : ' * 9 * * *'
6+
7+ jobs :
8+ python-lint :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v1
13+ - name : Setup Python
14+ uses : actions/setup-python@v2
15+ with :
16+ python-version : 2.7
17+ - name : Install Flake
18+ run : |
19+ python2 -m pip install flake8 pylint
20+ - name : Lint with flake8
21+ run : |
22+ # stop the build if there are Python syntax errors or undefined names
23+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
24+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
25+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
26+ - name : Lint with pylint
27+ run : |
28+ pylint **/*.py
29+
30+ shell-lint :
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v1
35+ - name : Install ShellCheck
36+ run : |
37+ sudo apt-get install shellcheck
38+ - name : Lint with ShellCheck
39+ run : |
40+ shellcheck --shell=bash -x $(find ./ -iname "*.sh")
41+
42+ json-lint :
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Checkout
46+ uses : actions/checkout@v1
47+ - name : Install node
48+ run : |
49+ sudo apt install nodejs
50+ - name : Install jsonlint
51+ run : |
52+ sudo npm install -g jsonlint
53+ - name : Lint with jsonlint
54+ run : |
55+ for file in $(find ./ -iname "*.json"); do jsonlint $file; done
You can’t perform that action at this time.
0 commit comments