27 lines
743 B
YAML
27 lines
743 B
YAML
name: Python code review
|
|
on: [push, pull_request]
|
|
jobs:
|
|
Test:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: Set up Python
|
|
uses: actions/setup-python@main
|
|
with:
|
|
python-version: 3.x
|
|
- uses: actions/cache@main
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-lint
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-lint
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install flake8
|
|
- name: Lint with flake8
|
|
run: |
|
|
python -m flake8 . --builtins=_,I --ignore=E501 --count --benchmark --show-source --statistics
|