-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from bhayden53/master
github actions for code style and lint checks
- Loading branch information
Showing
1 changed file
with
61 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,61 @@ | ||
name: code checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
bandit: | ||
name: run bandit | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: set up python 3.6.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6.10 | ||
|
||
- name: install dependencies | ||
run: pip install bandit | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: run bandit security checks | ||
run: bandit -ll -r calcloud | ||
|
||
black: | ||
name: run black | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: set up python 3.6.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6.10 | ||
|
||
- name: install dependencies | ||
run: pip install black | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: run black style checks | ||
run: black --check calcloud lambda | ||
|
||
flake8: | ||
name: run flake8 | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: set up python 3.6.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6.10 | ||
|
||
- name: install dependencies | ||
run: pip install flake8 | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: run flake8 python lint checks | ||
run: flake8 --count --max-line-length=120 --exclude docs |