Skip to content

maintenance: add python 3.12 compatibility, uv, dependencies #806

maintenance: add python 3.12 compatibility, uv, dependencies

maintenance: add python 3.12 compatibility, uv, dependencies #806

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.10", "3.11", "3.12" ]
resolution: [ "highest", "lowest-direct" ]
steps:
- uses: actions/checkout@v3
- name: Set up uv and caching
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-suffix: "${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.resolution }}"
version: "0.4.9"
- name: Create venv
run: |
uv venv --seed --python ${{ matrix.python-version }}
- name: Install ${{ matrix.resolution }} dependencies
run: |
uv pip install --resolution ${{ matrix.resolution }} .[test]
- name: Test with pytest (linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
source .venv/bin/activate
pytest --xdoc --cov=primap2 --cov-report=xml
- name: Test with pytest (windows)
if: startsWith(matrix.os, 'windows')
run: |
.venv\Scripts\activate
pytest --xdoc --cov=primap2 --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml