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

Commit 17228d8

Browse files
committed
add github actions for lint tests
1 parent 401f0e7 commit 17228d8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/lint_test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Python Syntax
2+
3+
on:
4+
schedule:
5+
- cron: '* */6 * * *'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2.2.0
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

0 commit comments

Comments
 (0)