-
Notifications
You must be signed in to change notification settings - Fork 9
31 lines (31 loc) · 904 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
name: Code Style
on:
- push
- pull_request
jobs:
flake:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: |
python -m pip install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
- name: Lint with flake8
run: poetry run flake8 --show-source src