Skip to content

Replace Poetry with uv for dependency management and workflows #1783

Replace Poetry with uv for dependency management and workflows

Replace Poetry with uv for dependency management and workflows #1783

Workflow file for this run

name: Run tests
on:
pull_request:
workflow_call:
jobs:
run_tests:
runs-on: ubuntu-latest
if: ${{ ! contains(github.event.head_commit.message, '[skip fast tests]') }}
env:
PYTENSOR_FLAGS: "blas__ldflags=-L/usr/lib/x86_64-linux-gnu -lblas -llapack"
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
# Install a specific version of uv.
version: "0.5.9"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install hssm
if: steps.cache.outputs.cache-hit != 'true'
run: uv sync --all-extras --dev
- name: Run tests and collect coverage
run: uv run pytest -n=auto --cov=. --cov-report=xml --cov-report=term-missing --exitfirst --capture=no tests/
env:
PYTENSOR_FLAGS: ${{ env.PYTENSOR_FLAGS }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}