Skip to content

Commit e805a32

Browse files
author
Developer
committed
Fix GitHub workflow paths for new directory structure
- Update black check to use src/ tests/ main.py - Add isort check for import sorting - Update flake8 to check new paths - Add ruff check for all Python versions - Update mypy to check src/ directory - Update pytest to run tests/ with src/ coverage - Fixes workflow errors for all Python versions (3.8-3.11)
1 parent 0ad69c6 commit e805a32

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/lint.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,28 @@ jobs:
2828
2929
- name: Format check with black
3030
run: |
31-
black --check main.py test_main.py
31+
black --check src/ tests/ main.py
32+
33+
- name: Sort imports with isort
34+
run: |
35+
isort --check-only src/ tests/ main.py
3236
3337
- name: Lint with flake8
3438
run: |
35-
flake8 main.py test_main.py --count --select=E9,F63,F7,F82 --show-source --statistics
36-
flake8 main.py test_main.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
flake8 src/ tests/ main.py --count --select=E9,F63,F7,F82 --show-source --statistics
40+
flake8 src/ tests/ main.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41+
42+
- name: Check with ruff
43+
run: |
44+
ruff check src/ tests/ main.py
3745
3846
- name: Type check with mypy
3947
run: |
40-
mypy main.py --ignore-missing-imports
48+
mypy src/ --ignore-missing-imports
4149
4250
- name: Run tests with pytest
4351
run: |
44-
pytest --cov=. --cov-report=xml --cov-report=term-missing
52+
pytest tests/ --cov=src --cov-report=xml --cov-report=term-missing
4553
4654
- name: Upload coverage to Codecov
4755
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)