-
Notifications
You must be signed in to change notification settings - Fork 35
32 lines (30 loc) · 1.02 KB
/
codefmt.yml
File metadata and controls
32 lines (30 loc) · 1.02 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
name: benchkit 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
run: |
python3 -m pip install --upgrade pip
pip3 install "pylint<=4.0.4" "black<=25.12.0" "flake8<=7.3.0" "isort<=7.0.0" "flake8<=7.3.0"
- name: Show versions of tools
run: pip3 freeze
# - name: Analysing the code with pylint
# run: |
# pylint $(git ls-files '*.py')
- name: Run isort
run: isort --check-only --profile=black benchkit/ examples/ plotbench/src/ scripts/ tests/ tutorials/
- name: Run Black
run: black -l 100 --check .
- name: Run Flake8
run: flake8 benchkit/ examples/ plotbench/src/ scripts/ tests/ tutorials/
- name: Check copyright
run: python3 ./scripts/list_missing_copyright.py
- name: Check final newlines
run: python3 ./scripts/check_final_newline.py