Skip to content

Reduce CI cache storage #638

Reduce CI cache storage

Reduce CI cache storage #638

Workflow file for this run

---
name: CI
permissions:
contents: read
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
UV_PYTHON_DOWNLOADS: "false"
UV_NO_SYNC: "1"
jobs:
linux:
name: "Linux (${{ matrix.python-version }})"
runs-on: "ubuntu-latest"
services:
redis:
image: redis:8
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "3.15"
- "3.15t"
steps:
- uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
persist-credentials: false
- uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0
id: setup-python
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
- uses: $/.github/actions/setup-uv
with:
python-version: ${{ matrix.python-version }}-${{ steps.setup-python.outputs.python-version }}
- run: rustup component add llvm-tools-preview
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
uv sync --only-group nox --only-group coverage
- name: "Create nox environment for ${{ matrix.python-version }}"
run: "uv run nox --python ${{ matrix.python-version }} -v --install-only"
- name: "Run nox targets for ${{ matrix.python-version }}"
run: "uv run nox --python ${{ matrix.python-version }} --no-install -- -r aR"
- name: "Convert coverage"
run: |
uv run coverage combine
uv run coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Prune dependency cache
shell: bash
run: |
uv cache clean logbook
uv cache prune --ci
windows:
name: "Windows (${{ matrix.python-version }}, ${{ matrix.arch }})"
runs-on: "windows-2022"
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "3.15"
- "3.15t"
arch: ["x86", "x64"]
env:
ENABLE_LOGBOOK_NTEVENTLOG_TESTS: "1"
steps:
- uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
persist-credentials: false
- uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0
id: setup-python
with:
python-version: "${{ matrix.python-version }}"
architecture: "${{ matrix.arch }}"
allow-prereleases: true
- uses: $/.github/actions/setup-uv
with:
python-version: ${{ matrix.python-version }}-${{ steps.setup-python.outputs.python-version }}
architecture: ${{ matrix.arch }}
- run: rustup component add llvm-tools-preview
- run: python -VV
- run: python -m site
- run: uv sync --only-group nox --only-group coverage
- name: "Create nox environment for ${{ matrix.python-version }} on ${{ matrix.arch }}"
run: "uv run nox --python ${{ matrix.python-version }} -v -k 'not rust' --install-only"
- name: "Run nox targets for ${{ matrix.python-version }} on ${{ matrix.arch }}"
run: "uv run nox --python ${{ matrix.python-version }} --no-install -k 'not rust' -- -r aR -k 'not redis'"
- run: uv run coverage combine
- run: uv run coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Prune dependency cache
shell: bash
run: |
uv cache clean logbook
uv cache prune --ci
macos:
name: "macOS (${{ matrix.python-version }})"
runs-on: "macos-latest"
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "3.15"
- "3.15t"
steps:
- uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
persist-credentials: false
- uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0
id: setup-python
with:
python-version: "${{ matrix.python-version }}"
architecture: "${{ matrix.arch }}"
allow-prereleases: true
- uses: $/.github/actions/setup-uv
with:
python-version: ${{ matrix.python-version }}-${{ steps.setup-python.outputs.python-version }}
- run: rustup component add llvm-tools-preview
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
uv sync --only-group nox --only-group coverage
- name: "Create nox environment for ${{ matrix.python-version }}"
run: "uv run nox --python ${{ matrix.python-version }} -v --install-only"
- name: "Run nox targets for ${{ matrix.python-version }}"
run: "uv run nox --python ${{ matrix.python-version }} --no-install -- -r aR -k 'not redis'"
- name: "Convert coverage"
run: |
uv run coverage combine
uv run coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Prune dependency cache
shell: bash
run: |
uv cache clean logbook
uv cache prune --ci
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: "astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d" # v10.0.1
with:
enable-cache: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- name: check-sdist
run: |
uv sync --only-group check-sdist
uv run check-sdist
msrv:
name: "Python ${{ matrix.python-version }} with Rust ${{ matrix.rust-version }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "3.15"
- "3.15t"
rust-version: ["1.83.0"]
steps:
- uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
- uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0
id: setup-python
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: ${{ matrix.rust-version }}
- uses: $/.github/actions/setup-uv
with:
python-version: ${{ matrix.python-version }}-${{ steps.setup-python.outputs.python-version }}
- run: rustup component add llvm-tools-preview
- name: "Install dependencies"
run: |
set -xe
python -VV
rustc --version
python -m site
uv --version
uv sync --only-group nox --only-group coverage
- name: "Create nox environment"
run: "uv run nox --python ${{ matrix.python-version }} -v -k 'not nospeedups' --install-only"
- name: "Run nox"
run: "uv run nox --python ${{ matrix.python-version }} --no-install -k 'not nospeedups' -- -r aR -k 'not redis'"
- name: Prune dependency cache
shell: bash
run: |
uv cache clean logbook
uv cache prune --ci