Skip to content

Bump types-requests from 2.33.0.20260712 to 2.33.0.20260906 #96

Bump types-requests from 2.33.0.20260712 to 2.33.0.20260906

Bump types-requests from 2.33.0.20260712 to 2.33.0.20260906 #96

Workflow file for this run

name: CI
on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
schedule:
- cron: "23 5 * * 1" # weekly, to surface upstream releases deliberately
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python 3.11
run: |
uv python install 3.11
- name: Install dependencies
run: uv sync --locked --extra dev --all-groups
- name: Run ruff linting
run: |
uv run ruff check allocator/ tests/
- name: Run ruff formatting check
run: |
uv run ruff format --check allocator/ tests/
- name: Run mypy type checking
run: |
uv run mypy allocator/
- name: Run deptry (dependency checks)
run: |
uv run deptry allocator/
- name: Run vulture (dead code detection)
run: |
uv run vulture allocator/ allocator/vulture_whitelist.py --min-confidence 80
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --extra test --all-groups
- name: Test with pytest (core functionality)
run: |
uv run pytest tests/ --cov=allocator --cov-report=xml --cov-report=term-missing -v --tb=short
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
if: matrix.python-version == '3.11'
with:
file: ./coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
test-algorithms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python 3.11
run: |
uv python install 3.11
- name: Install dependencies
run: uv sync --locked --extra test --extra algorithms --extra geo --all-groups
- name: Test advanced algorithms
run: |
uv run pytest tests/api/ -k "ortools or google or christofides" -v --tb=short
# Every other job installs from uv.lock, so CI and a developer's machine agree.
# That is the point, and it has a cost: CI stops noticing when a new release
# upstream breaks us. numba 0.66.0 changed prange's annotation and left the lint
# job red on master for two months, invisible to everyone because uv.lock pinned
# 0.65.0 and every local run was green. Two more failures were queued up behind
# that one, each hidden by the step before it.
#
# So resolve the latest of everything on a schedule. Upstream breakage then
# arrives as a run named "resolve-latest", on a Monday, instead of ambushing
# whoever opens the next unrelated pull request.
resolve-latest:
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
- name: Set up Python 3.11
run: uv python install 3.11
# The same extras the lint and test jobs use, deliberately not --all-extras,
# so this job checks the install most people actually have rather than the
# maximal one.
- name: Resolve the latest of everything, ignoring the lock
run: uv sync --upgrade --extra dev --extra test --all-groups
- name: Show what changed against the lock
run: uv pip list
- name: Lint
run: |
uv run ruff check allocator/ tests/
uv run mypy allocator/
uv run deptry allocator/
- name: Test
run: uv run pytest tests/ -q --no-header
build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
- name: Set up Python 3.11
run: |
uv python install 3.11
- name: Build package
run: |
uv build
- name: Check package
run: |
uv tool run twine check dist/*