-
Notifications
You must be signed in to change notification settings - Fork 96
35 lines (29 loc) · 930 Bytes
/
python.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
32
33
34
35
---
name: Python formatting
"on": pull_request
jobs:
PEP8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '.github/requirements-python-lint.txt'
- id: pip_install
run: pip install -r '.github/requirements-python-lint.txt'
- name: isort
run: isort . --check --diff
if: (success() || failure()) && steps.pip_install.conclusion == 'success'
- name: Black
uses: psf/black@stable
with:
version: "~=23.0"
options: "--check --diff"
src: "."
if: (success() || failure()) && steps.pip_install.conclusion == 'success'
- name: Flake8
run: flake8 .
if: (success() || failure()) && steps.pip_install.conclusion == 'success'