From d9c961295ab02302ff9b55e54d3fa6b6a07e3be8 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Thu, 19 Sep 2024 11:20:06 +0100 Subject: [PATCH] test with more Python versions and --release (#42) --- .github/workflows/run-tests.yml | 4 ++-- .github/workflows/run-weekly-tests.yml | 28 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f18614d..9960da2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Set up Python uses: actions/setup-python@v4 @@ -70,7 +70,7 @@ jobs: - name: Install python package run: | source .venv/bin/activate - maturin develop + maturin develop --release - name: Run Python tests run: | source .venv/bin/activate diff --git a/.github/workflows/run-weekly-tests.yml b/.github/workflows/run-weekly-tests.yml index 041cb1e..286669d 100644 --- a/.github/workflows/run-weekly-tests.yml +++ b/.github/workflows/run-weekly-tests.yml @@ -57,3 +57,31 @@ jobs: - name: Build docs run: cargo doc --features "mpi,strict" --no-deps + + run-tests-python: + name: Run Python tests + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/checkout@v4 + - name: Install uv + run: pip install uv "maturin>=1.7" + - name: Make virtual environment + run: | + uv venv .venv + uv pip install pip pytest + - name: Install python package + run: | + source .venv/bin/activate + maturin develop --release + - name: Run Python tests + run: | + source .venv/bin/activate + python -m pytest python/test +