-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (48 loc) · 1.3 KB
/
codefmt.yml
File metadata and controls
61 lines (48 loc) · 1.3 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: pythainer code formatting
on:
push:
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies from requirements.txt
run: |
python3 -m pip install --upgrade pip
pip3 install $(grep -E '^(black|isort|flake8|pylint|pytest|ruff|mypy|types-click)' requirements.txt)
- name: Show versions of tools
run: |
python3 --version
black --version
echo "isort $(isort --version-number)"
flake8 --version
pylint --version
ruff --version
mypy --version
- name: Run isort (check only)
run: |
isort --check-only --profile=black src/ tests/ examples/ scripts/
- name: Run Black (check only)
run: |
black -l 100 --check .
- name: Run Flake8
run: |
flake8 src/ tests/ examples/
- name: Run pylint
run: |
pylint src/ tests/ examples/
- name: Run ruff
run: |
ruff check .
# TODO enable when ready:
# - name: Run mypy
# run: |
# mypy .
- name: Check copyright
run: |
chmod +x scripts/list_missing_copyright.sh
./scripts/list_missing_copyright.sh