| 1 |
name: Lint |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
permissions: {} |
| 6 |
|
| 7 |
jobs: |
| 8 |
ruff: |
| 9 |
runs-on: ubuntu-latest |
| 10 |
steps: |
| 11 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 12 |
- uses: astral-sh/ruff-action@278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0 |
| 13 |
with: |
| 14 |
args: 'format --check --diff' |
| 15 |
- uses: astral-sh/ruff-action@278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0 |
| 16 |
with: |
| 17 |
args: 'check' |
| 18 |
|
| 19 |
pylint: |
| 20 |
runs-on: ubuntu-latest |
| 21 |
strategy: |
| 22 |
matrix: |
| 23 |
python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 24 |
steps: |
| 25 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 26 |
- name: Set up Python ${{ matrix.python-version }} |
| 27 |
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| 28 |
with: |
| 29 |
python-version: ${{ matrix.python-version }} |
| 30 |
- name: Install dependencies |
| 31 |
run: | |
| 32 |
python -m pip install --upgrade pip |
| 33 |
pip install .[test] |
| 34 |
- name: Analysing the code with pylint |
| 35 |
run: | |
| 36 |
pylint $(git ls-files 'src/*.py') |
| 37 |
|
| 38 |
pyright: |
| 39 |
runs-on: ubuntu-latest |
| 40 |
strategy: |
| 41 |
matrix: |
| 42 |
python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 43 |
steps: |
| 44 |
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 45 |
- name: Set up Python ${{ matrix.python-version }} |
| 46 |
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| 47 |
with: |
| 48 |
python-version: ${{ matrix.python-version }} |
| 49 |
- name: Install dependencies |
| 50 |
run: | |
| 51 |
python -m pip install --upgrade pip |
| 52 |
pip install -e .[test] |
| 53 |
- uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2 |