Add more checks
- python code formatting is tested with yapf - cron workflow to run cargo audit - Don't run on latest
This commit is contained in:
44
.github/workflows/python.yml
vendored
Normal file
44
.github/workflows/python.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: pylint
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**/*.py'
|
||||
- '.pylintrc'
|
||||
- '!third_party/**'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
jobs:
|
||||
pylint:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install tockloader
|
||||
- name: Test code with pylint
|
||||
run: |
|
||||
pip install pylint
|
||||
pylint --rcfile=.pylintrc --score=n `find . ! -path "./third_party/*" -type f -name '*.py'`
|
||||
|
||||
yapf:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install yapf
|
||||
- name: Test code formatting with yapf
|
||||
run: yapf --style=chromium --recursive --exclude third_party --diff .
|
||||
Reference in New Issue
Block a user