Set [tool.deptry.ignore_notebooks]
explicitly as deptry
config
#1249
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
permissions: {} | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
paths-ignore: | |
- "docs/**" | |
- "**/*.md" | |
- "mkdocs.yml" | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "**/*.md" | |
- "mkdocs.yml" | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
permissions: | |
contents: read | |
pull-requests: write # Needed to add Codecov and CodSpeed comments | |
name: ${{ (matrix.codecov == 'true' && 'Codecov') || (matrix.codspeed == 'true' && 'CodSpeed') || format('Test Python {0} {1}', matrix.python_version, ((matrix.dependencies == 'min' || matrix.dependencies == 'max') && format('{0} dependencies', matrix.dependencies)) || (matrix.os || 'ubuntu-latest')) }} | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
env: | |
PYTHONIOENCODING: utf-8 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- name: Setup git user config | |
run: | | |
git config --global user.name placeholder | |
git config --global user.email [email protected] | |
- name: Set up uv | |
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1 | |
with: | |
version: ${{ matrix.uv_version || 'latest' }} | |
enable-cache: true | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Bump dependencies | |
if: ${{ matrix.dependencies == 'max' }} | |
run: | | |
uv sync --upgrade | |
- name: Setup dependencies | |
run: | | |
uv python pin $CI_PYTHON_VERSION | |
uv sync | |
env: | |
UV_RESOLUTION: ${{ matrix.dependencies == 'min' && 'lowest-direct' || 'highest' }} | |
CI_PYTHON_VERSION: ${{ matrix.python_version }} | |
- name: Run prek | |
if: ${{ matrix.pre_commit == null || matrix.pre_commit == 'true' }} | |
run: | | |
uv run --frozen prek run --all-files | |
- name: Run pytest | |
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0 | |
if: ${{ (matrix.pytest == null || matrix.pytest == 'true') && (github.event_name == 'schedule' || matrix.dependencies != 'max') }} | |
with: | |
custom-pytest: uv run --frozen pytest | |
custom-arguments: --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@6b43a0cd438f6ca5ad26f9ed03ed159ed2df7da9 # v4.1.1 | |
if: ${{ matrix.codspeed != null && matrix.codspeed == 'true' }} | |
with: | |
mode: instrumentation | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
run: uv run --frozen pytest --codspeed | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 | |
if: ${{ matrix.codecov != null && matrix.codecov == 'true' }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
- name: Upload test results to Codecov | |
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 | |
if: ${{ matrix.codecov != null && matrix.codecov == 'true' && !cancelled() }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
strategy: | |
matrix: | |
python_version: ["3.10", "3.14"] | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
dependencies: ["lockfile"] | |
codecov: ["false"] | |
codspeed: ["false"] | |
include: | |
- python_version: "3.11" | |
os: "ubuntu-latest" | |
- python_version: "3.12" | |
os: "ubuntu-latest" | |
- python_version: "3.13" | |
os: "ubuntu-latest" | |
- dependencies: "min" | |
python_version: "3.10" | |
uv_version: "0.6.8" | |
pre_commit: "false" | |
- dependencies: "max" # Cron only (Pytest skipped) | |
python_version: "3.14" | |
pre_commit: "false" | |
- codecov: "true" | |
python_version: "3.14" | |
pre_commit: "false" | |
- codspeed: "true" | |
python_version: "3.13" | |
pre_commit: "false" | |
pytest: "false" |