Skip to content

release: v0.2.1

release: v0.2.1 #80

Workflow file for this run

name: Tests
on:
push:
pull_request:
workflow_call: # invoked by release.yml to gate publishing on a green test run
jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.11.20"
enable-cache: true
- name: Install Dependencies
run: uv sync --locked --extra demo
- name: Check requirements.txt is in sync with uv.lock
if: runner.os == 'Linux'
run: uv export --locked --no-default-groups --extra cpu --no-emit-project --no-hashes --no-annotate --no-header | diff - requirements.txt
- name: Get model cache directory
id: model-cache-dir
shell: bash
run: |
dir=$(uv run python -c "from iscc_sct.utils import MODEL_PATH; print(MODEL_PATH.parent)")
echo "dir=$dir" >> "$GITHUB_OUTPUT"
- name: Cache ONNX model
uses: actions/cache@v4
with:
path: ${{ steps.model-cache-dir.outputs.dir }}
key: ${{ runner.os }}-onnx-model-${{ hashFiles('**/utils.py') }}
restore-keys: |
${{ runner.os }}-onnx-model-
- name: Run Tests
run: uv run pytest --cov=iscc_sct --cov-report=xml -v tests