Skip to content

Brostk/3866 remove mypy test exclusions #52

Brostk/3866 remove mypy test exclusions

Brostk/3866 remove mypy test exclusions #52

Workflow file for this run

name: "Test & Lint"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow manual triggering
workflow_dispatch:
jobs:
test-python:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.10.12"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 'latest'
- name: Load or Install Dependencies
uses: actions/cache@v4
id: poetry-cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
continue-on-error: true # Ensures workflow runs even if cache retrieval fails
- name: Install dependencies if cache missed
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install --no-root
- name: "Run ruff format"
run: poetry run ruff format
- name: "Run ruff check"
run: poetry run ruff check
- name: "Run mypy"
run: poetry run mypy .
- name: "Run tests"
run: poetry run pytest --cov=src --cov-report=html