feat: pyisolate 0.10.0 — conda backend, sealed workers, CUDA wheels, … #88
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| test-python-versions: | |
| name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12'] | |
| os: [ubuntu-latest, ubuntu-22.04, ubuntu-24.04] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install bubblewrap | |
| run: sudo apt-get update && sudo apt-get install -y bubblewrap | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev,test]" | |
| - name: Run tests with coverage | |
| run: | | |
| source .venv/bin/activate | |
| pytest --cov=pyisolate --cov-report=xml --cov-report=term-missing -v | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| test-linux-distros: | |
| name: Test on ${{ matrix.container }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - container: debian:12 | |
| python-install: | | |
| apt-get update && apt-get install -y python3 python3-pip python3-venv git curl bubblewrap | |
| extras: "dev,test" | |
| - container: fedora:38 | |
| python-install: | | |
| dnf install -y python3 python3-pip git curl bubblewrap | |
| extras: "dev,test" | |
| - container: fedora:39 | |
| python-install: | | |
| dnf install -y python3 python3-pip git curl bubblewrap | |
| extras: "dev,test" | |
| container: ${{ matrix.container }} | |
| steps: | |
| - name: Install Python and Git | |
| run: ${{ matrix.python-install }} | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Install package | |
| run: | | |
| $HOME/.local/bin/uv venv --python python3 | |
| . .venv/bin/activate | |
| $HOME/.local/bin/uv pip install -e ".[${{ matrix.extras }}]" | |
| - name: Run tests | |
| run: | | |
| . .venv/bin/activate | |
| if [ "${{ matrix.extras }}" = "dev" ]; then | |
| # Skip torch-related tests on platforms without torch support | |
| pytest -v -k "not torch and not TestShareTorchConfiguration" | |
| else | |
| pytest -v | |
| fi | |
| lint-and-type: | |
| name: Lint and Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev,test]" | |
| - name: Run ruff | |
| run: | | |
| source .venv/bin/activate | |
| ruff check pyisolate tests | |
| ruff format --check pyisolate tests | |
| - name: Run mypy | |
| run: | | |
| source .venv/bin/activate | |
| mypy pyisolate |