Skip to content

ci(pre-commit.ci): autoupdate (#29) #132

ci(pre-commit.ci): autoupdate (#29)

ci(pre-commit.ci): autoupdate (#29) #132

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: [v*]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.platform }} (${{ matrix.python-version }})
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13"]
platform: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: "14.29"
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.5"
enable-cache: true
# this all got harder when trying to incorporate the C++ coverage
# c-coverage is very hard to do without editable mode, but that
# requires activating the virtual environment, which is a bit
# difficult on Windows.
- name: install and test with C++ coverage
if: runner.os == 'Linux'
run: |
uv sync --frozen --no-install-project
. .venv/bin/activate
uv pip install -e . --no-build-isolation --force-reinstall \
-C=setup-args="-Db_coverage=true" \
-C=editable-verbose=true
pytest --color=yes -v --cov --cov-report=xml
gcovr --filter=src/ --xml coverage_cpp.xml
- name: install and test
if: runner.os != 'Linux'
run: uv run --no-editable pytest --color=yes -v --cov --cov-report=xml
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml,./coverage_cpp.xml