Skip to content

ci: use uv

ci: use uv #809

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
value:
- name: "3.9"
python-version: "3.9"
extra-install: ""
- name: "3.10"
python-version: "3.10"
extra-install: ""
- name: "3.11"
python-version: "3.11"
extra-install: ""
- name: "3.12"
python-version: "3.12"
extra-install: ""
- name: "3.12-pre-beartype"
python-version: "3.12"
extra-install: "uv pip install --upgrade --pre beartype"
- name: "3.13"
python-version: "3.13"
extra-install: ""
- name: "3.13-pre-beartype"
python-version: "3.13"
extra-install: "uv pip install --upgrade --pre beartype"
name: Test ${{ matrix.value.name }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.value.python-version }}
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --locked --all-extras --group dev
${{ matrix.value.extra-install }}
- name: Test linter assertions
run: uv run --frozen check_linter_assertions.py tests/typechecked
- name: Run tests
run: |
PRAGMA_VERSION=`uv run python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))"` \
uv run --frozen pytest -v --cov=plum --cov-report term-missing
- name: Coveralls parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ matrix.value.name }}
parallel: true
finish:
name: Finish coverage
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true