Skip to content

DM-52550: Fix Starlette deprecation warning #1600

DM-52550: Fix Starlette deprecation warning

DM-52550: Fix Starlette deprecation warning #1600

Workflow file for this run

name: Python CI
env:
# Default Python version used for all jobs other than test, which uses a
# matrix of supported versions. Quote the version to avoid interpretation as
# a floating point number.
PYTHON_VERSION: "3.13"
"on":
merge_group: {}
pull_request: {}
push:
branches-ignore:
# These should always correspond to pull requests, so ignore them for
# the push trigger and let them be triggered by the pull_request
# trigger, avoiding running the workflow twice. This is a minor
# optimization so there's no need to ensure this is comprehensive.
- "dependabot/**"
- "gh-readonly-queue/**"
- "renovate/**"
- "tickets/**"
- "u/**"
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python:
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # full history for setuptools_scm
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
# Use floating latest uv version, since we've had great luck with
# backward compatibility. If we run into the problems in the future, we
# can do something more complicated with a pinned version updated with a
# script run by `make update-deps` similar to service packages.
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Run nox
run: uv run --only-group nox nox -s lint typing test
docs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # full history for setuptools_scm
- name: Set up Python
uses: actions/setup-python@v6
with:
version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -u graphviz
- name: Run nox
run: uv run --only-group=nox nox -s docs docs-linkcheck
# Only attempt documentation uploads for tagged releases and pull
# requests from ticket branches in the same repository. This avoids
# version clutter in the docs and failures when a PR doesn't have access
# to secrets.
- name: Upload to LSST the Docs
uses: lsst-sqre/ltd-upload@v1
with:
project: "safir"
dir: "docs/_build/html"
username: ${{ secrets.LTD_USERNAME }}
password: ${{ secrets.LTD_PASSWORD }}
if: >
(github.event_name == 'push' && github.ref_name == 'main')
|| (github.event_name == 'release'
&& github.event.action == 'published')
|| (github.event_name == 'workflow_dispatch')
|| (github.event_name == 'pull_request'
&& startsWith(github.head_ref, 'tickets/'))
test-packaging:
name: Test packaging
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [test, docs]
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # full history for setuptools_scm
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build the packages
run: uv build --no-sources --all-packages
pypi:
name: Upload release to PyPI
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [test, docs, test-packaging]
environment:
name: pypi
url: https://pypi.org/p/safir
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # full history for setuptools_scm
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build the packages
run: uv build --no-sources --all-packages
- name: Publish the packages
run: uv publish