Skip to content

ci: ruff format the regenerated _models.py #9

ci: ruff format the regenerated _models.py

ci: ruff format the regenerated _models.py #9

Workflow file for this run

name: CI
on:
push:
branches: [stage, master]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Sync deps
run: uv sync --python ${{ matrix.python-version }}
- name: Lint (ruff)
run: uv run --python ${{ matrix.python-version }} ruff check postio/ tests/
- name: Format check (ruff)
run: uv run --python ${{ matrix.python-version }} ruff format --check postio/ tests/
- name: Type-check (mypy)
run: uv run --python ${{ matrix.python-version }} mypy postio/
- name: Offline tests
run: uv run --python ${{ matrix.python-version }} pytest tests/test_offline.py -v
live-test:
# Live tests gated on master pushes only — they consume real stage credit.
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Sync deps
run: uv sync
- name: Live tests against stage
env:
POSTIO_API_KEY_STAGE: ${{ secrets.POSTIO_API_KEY_STAGE }}
run: uv run pytest tests/ -v --ignore=tests/test_offline.py