Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 51c0359

Browse files
committed
add github actions for lint tests
1 parent f99c3a3 commit 51c0359

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/lint_test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 Pylint
18+
run: |
19+
python2 -m pip install pylint
20+
- name: Lint with pylint
21+
run: |
22+
pylint **/*.py
23+
24+
shell-lint:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v1
29+
- name: Install ShellCheck
30+
run: |
31+
sudo apt-get install shellcheck
32+
- name: Lint with ShellCheck
33+
run: |
34+
shellcheck --shell=bash -x $(find ./ -iname "*.sh")
35+
36+
json-lint:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v1
41+
- name: Install node
42+
run: |
43+
sudo apt install nodejs
44+
- name: Install jsonlint
45+
run: |
46+
sudo npm install -g jsonlint
47+
- name: Lint with jsonlint
48+
run: |
49+
for file in $(find ./ -iname "*.json"); do jsonlint $file; done

0 commit comments

Comments
 (0)