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

Commit e9fae09

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

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/lint_test.yml

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

0 commit comments

Comments
 (0)