Skip to content

feat!: v3

feat!: v3 #798

Workflow file for this run

name: Test
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.11, 3.12]
test-type: [minimal, full]
include:
- os: windows-latest
python-version: "3.11"
test-type: minimal
- os: windows-latest
python-version: "3.11"
test-type: full
- os: macos-latest
python-version: "3.11"
test-type: minimal
- os: macos-latest
python-version: "3.11"
test-type: full
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}
activate-environment: true
- name: Set environment variables
id: set-env
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
echo "UV=$(where uv)" >> $GITHUB_ENV
echo "PIP=$(where pip)" >> $GITHUB_ENV
else
echo "UV=$(which uv)" >> $GITHUB_ENV
echo "PIP=$(which pip)" >> $GITHUB_ENV
fi
echo "SYSTEM_PYTHON=python${{ matrix.python-version }}" >> $GITHUB_ENV
shell: bash
- name: Install dependencies (minimal)
if: matrix.test-type == 'minimal'
run: |
${{ env.UV }} lock
${{ env.UV }} --no-progress pip install -e ".[test]"
- name: Install dependencies (full)
if: matrix.test-type == 'full'
run: |
${{ env.UV }} lock
${{ env.UV }} lock
make install UV="${{ env.UV }}" PIP="${{ env.PIP }}" SYSTEM_PYTHON="${{ env.SYSTEM_PYTHON }}"
- name: Test minimal installation
if: matrix.test-type == 'minimal'
run: |
# Run a basic test to ensure the minimal package works
${{ env.UV }} run python -c "import wurzel; print('Minimal installation successful')"
# Run only core tests that don't require optional dependencies
${{ env.UV }} run pytest tests/ -k "not (qdrant or milvus or docling or openai or transformers or tlsh)" -v
- name: Test full installation
if: matrix.test-type == 'full'
run: make test