This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
401f0e7
commit ceefcd1
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: syntax check | ||
|
||
on: | ||
schedule: | ||
- cron: '* 9 * * *' | ||
|
||
jobs: | ||
python-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 2.7 | ||
- name: Install Flake | ||
run: | | ||
python2 -m pip install flake8 pylint | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Lint with pylint | ||
run: | | ||
pylint **/*.py | ||
shell-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Install ShellCheck | ||
run: | | ||
sudo apt-get install shellcheck | ||
- name: Lint with ShellCheck | ||
run: | | ||
shellcheck --shell=bash -x $(find ./ -iname "*.sh") | ||
json-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Install node | ||
run: | | ||
sudo apt install nodejs | ||
- name: Install jsonlint | ||
run: | | ||
sudo npm install -g jsonlint | ||
- name: Lint with jsonlint | ||
run: | | ||
for file in $(find ./ -iname "*.json"); do jsonlint $file; done |