Skip to content

Ignore "Module site shadows" lint #44

Ignore "Module site shadows" lint

Ignore "Module site shadows" lint #44

Workflow file for this run

name: Test and lint package
on:
workflow_dispatch:
pull_request:
push:
paths:
- '.github/workflows/push_test.yml'
- 'aio_taginfo/**'
- 'tests/**'
- 'poetry.lock'
- 'pyproject.toml'
- 'tasks.py'
jobs:
test-locked:
name: Test package
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
cache-dependency-path: poetry.lock
- name: Install dependencies & library
run: poetry install --no-interaction
- name: Test with pytest
run: poetry run pytest -vv
- name: Generate docs with pdoc
run: poetry run pdoc -o ./doc aio_taginfo/
test-matrix:
name: Test different dependency versions
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
python: ["3.11", "3.12", "3.13"]
aiohttp: ["3.10", "3.11"]
pydantic: ["2.9", "2.10"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies & library
run: |
poetry install --no-interaction
poetry add aiohttp=~${{ matrix.aiohttp }} --extras="speedups" --python="<=${{ matrix.python }}" --no-interaction
poetry add pydantic=~${{ matrix.pydantic }} --python="<=${{ matrix.python }}" --no-interaction
- name: Test with pytest
run: poetry run pytest -vv
coverage:
name: Upload test coverage to Codecov (3.11)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'
cache-dependency-path: poetry.lock
- name: Install dependencies & library
run: poetry install --no-interaction
- name: Test with pytest
run: poetry run pytest -vv --cov=aio_taginfo/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
lint:
name: Lint package (3.11)
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'
cache-dependency-path: poetry.lock
- name: Check if pyproject.toml consistent with poetry.lock
run: poetry check --lock --no-interaction
- name: Install dependencies & library
run: poetry install --no-interaction
- name: Check formatting with Ruff
if: always() # keep going even if previous step failed
run: poetry run ruff format aio_taginfo/ --check
- name: Lint with Ruff
if: always() # keep going even if previous step failed
run: poetry run ruff check aio_taginfo/
- name: Lint tests with Ruff
if: always() # keep going even if previous step failed
run: poetry run ruff check tests/
- name: Check types with mypy
if: always() # keep going even if previous step failed
run: poetry run mypy aio_taginfo/
- name: Check types with pyright
if: always() # keep going even if previous step failed
run: poetry run pyright aio_taginfo/