File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,12 +55,42 @@ jobs:
5555 pytest .
5656 env :
5757 CI : true
58+
59+ # Linting job
60+ lint :
61+ runs-on : ubuntu-latest
62+
63+ steps :
64+ # Checkout the repository
65+ - name : Checkout code
66+ uses : actions/checkout@v3
67+
68+ # Set up Python
69+ - name : Set up Python
70+ uses : actions/setup-python@v4
71+ with :
72+ python-version : ' 3.10'
73+
74+ # Cache pip dependencies
75+ - name : Cache pip
76+ uses : actions/cache@v3
77+ with :
78+ path : ~/.cache/pip
79+ key : ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
80+ restore-keys : |
81+ ${{ runner.os }}-pip-
82+
83+ # Install linting tools
84+ - name : Install linting tools
85+ run : |
86+ python -m venv env
87+ source env/bin/activate
88+ pip install --upgrade pip
89+ pip install black isort
5890
59- # Code formatting check with black
60- - name : Code formatting with black and isort
91+ # Code formatting check with black and isort
92+ - name : Run linters
6193 run : |
6294 source env/bin/activate
63- pip install black
64- pip install isort
6595 black --check src/
66- isort --check src/
96+ isort --check src/
You can’t perform that action at this time.
0 commit comments