-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.14 KB
/
lint.yml
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
name: lint
on: [push]
jobs:
black:
name: Check code formatting with black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract black version from requirements-dev.txt
id: black_version
run: echo "::set-output name=version::$(grep -oP 'black==\K[^"]+' requirements-dev.txt)"
- uses: psf/black@stable
with:
src: ./src
version: ${{ steps.back_version.outputs.version }}
ruff:
name: Check code formatting with ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract ruff version from requirements-dev.txt
id: ruff_version
run: echo "::set-output name=version::$(grep -oP 'ruff==\K[^"]+' requirements-dev.txt)"
- uses: chartboost/ruff-action@v1
with:
version: ${{ steps.ruff_version.outputs.version }}
mypy:
name: Check type hints with mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: |
pip install -r requirements-dev.txt
mypy src/