[pull] master from polakowo:master #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| branches: [master] | |
| types: [opened, synchronize, reopened, closed] | |
| workflow_dispatch: | |
| concurrency: | |
| group: tests-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| github.event.pull_request.merged == true || | |
| github.event.action != 'closed' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Create virtual environment | |
| run: uv venv --python ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv pip install --python .venv -e ".[test]" | |
| - name: Run tests | |
| run: uv run --python .venv --no-sync pytest tests/ | |
| rust-engine: | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| github.event.pull_request.merged == true || | |
| github.event.action != 'closed' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Create virtual environment | |
| run: uv venv --python ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv pip install --python .venv -e ".[test-rust]" | |
| - name: Build local Rust engine | |
| run: uv run --python .venv --no-sync python -m maturin develop --manifest-path rust/Cargo.toml --release | |
| - name: Run Rust engine tests | |
| run: uv run --python .venv --no-sync pytest tests/ |