forked from faif/python-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.16 KB
/
lint_python.yml
File metadata and controls
36 lines (36 loc) · 1.16 KB
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
36
name: lint_python
on: [pull_request, push]
jobs:
lint_python:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint with flake8
run: flake8 ./patterns --count --show-source --statistics
continue-on-error: true
- name: Format check with isort and black
run: |
isort --profile black --check ./patterns
black --check ./patterns
continue-on-error: true
- name: Type check with mypy
run: mypy --ignore-missing-imports ./patterns || true
continue-on-error: true
- name: Run tests with pytest
run: |
pytest ./patterns
pytest --doctest-modules ./patterns || true
continue-on-error: true
- name: Check Python version compatibility
run: shopt -s globstar && pyupgrade --py312-plus ./patterns/**/*.py
continue-on-error: true
- name: Run tox
run: tox
continue-on-error: true