Skip to content

fix: clear all mypy --strict and ruff lint failures introduced in v0.… #40

fix: clear all mypy --strict and ruff lint failures introduced in v0.…

fix: clear all mypy --strict and ruff lint failures introduced in v0.… #40

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: uv sync --all-extras --group dev
- run: uv run ruff check src/ tests/
- run: uv run ruff format --check src/ tests/
typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: uv sync --all-extras --group dev
- run: uv run mypy src/pyfly --strict
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: uv sync --all-extras --group dev
- name: Run tests
run: >
uv run pytest tests/
--ignore=tests/data/document
--ignore=tests/data/test_mongo_batch_operations.py
--ignore=tests/data/test_mongo_document.py
--ignore=tests/data/test_mongo_filter.py
--ignore=tests/data/test_mongo_post_processor.py
--ignore=tests/data/test_mongo_query_decorator.py
--ignore=tests/data/test_mongo_projection_query.py
--ignore=tests/data/test_mongo_query_compiler.py
--ignore=tests/data/test_mongo_repository.py
--ignore=tests/data/test_mongo_specification.py
--ignore=tests/data/test_mongo_wiring.py
-q --tb=short
--cov=src/pyfly --cov-report=term-missing --cov-report=xml
- name: Upload coverage
if: matrix.python-version == '3.13'
uses: actions/upload-artifact@v6
with:
name: coverage-report
path: coverage.xml
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- run: uv build
- uses: actions/upload-artifact@v6
with:
name: dist
path: dist/