Skip to content

pylint + ruff

pylint + ruff #38

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
name: Tests (Py ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}.
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # Enable pip download cache.
- name: Install package and development dependencies.
run: |
export PIP_ROOT_USER_ACTION=ignore # Silence root warning.
python -m pip install --upgrade pip build
pip install -e ".[dev]"
./ci/install_test_deps.sh
- name: Run pytest with coverage.
run: |
pytest -q
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Set up Python 3.12.
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dev dependencies.
run: |
export PIP_ROOT_USER_ACTION=ignore
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run ruff linter.
run: |
ruff check .
- name: Run pytest linter.
run: |
pylint --enable=missing-docstring \
--disable=missing-module-docstring \
--disable=logging-fstring-interpolation \
--disable=invalid-name \
--disable=too-many-return-statements \
--disable=fixme \
./collider
typecheck:
name: Typecheck
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Set up Python 3.12.
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dev dependencies.
run: |
export PIP_ROOT_USER_ACTION=ignore
python -m pip install --upgrade pip
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
- name: Run ty type checker.
run: |
source .venv/bin/activate
ty check collider