Repository navigation
Move test executions to Justfile #1897
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: Main | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build-test: | |
| name: Build and Test | |
| runs-on: ${{ matrix.os.instance }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - category: windows | |
| platform: x86 | |
| instance: windows-latest | |
| suffix: -windows-x86-none | |
| - category: windows | |
| platform: x64 | |
| instance: windows-latest | |
| suffix: -windows-x86_64-none | |
| - category: ubuntu | |
| platform: x64 | |
| instance: ubuntu-22.04 | |
| suffix: "" | |
| - category: ubuntu | |
| platform: arm64 | |
| instance: ubuntu-22.04-arm | |
| suffix: "" | |
| - category: macos | |
| platform: arm64 | |
| instance: macos-15 | |
| suffix: "" | |
| python: ["3.11", "3.12", "3.13", "3.14", "3.14t", "3.15", "3.15t"] | |
| exclude: | |
| # fails to call mono methods | |
| - os: | |
| category: windows | |
| platform: x86 | |
| python: '3.13' | |
| env: | |
| NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
| # Apply to every Mono host, including pytest and the .NET Python test runner. | |
| MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup just | |
| uses: extractions/setup-just@v4 | |
| # Use main until support for architecture lands | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@main | |
| with: | |
| dotnet-version: '10.0' | |
| architecture: ${{ matrix.os.platform }} | |
| - run: dotnet restore | |
| - name: Install Mono | |
| uses: pythonnet/clr-loader/.github/actions/install-mono@main | |
| with: | |
| arch: ${{ matrix.os.platform }} | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: cpython-${{ matrix.python }}${{ matrix.os.suffix }} | |
| cache-python: true | |
| activate-environment: true | |
| enable-cache: true | |
| - name: Synchronize the virtual environment | |
| run: uv sync --managed-python | |
| - name: Embedding tests (Mono/.NET Framework) | |
| if: always() | |
| run: just test-embed-mono ${{ matrix.os.platform }} | |
| - name: Embedding tests (.NET Core) | |
| if: always() | |
| run: just test-embed-core ${{ matrix.os.platform }} | |
| - name: Python Tests (.NET Core) | |
| if: always() | |
| run: just test-python-coreclr | |
| - name: Python Tests (Mono) | |
| if: always() | |
| run: just test-python-mono | |
| - name: Python Tests (.NET Framework) | |
| if: ${{ matrix.os.category == 'windows' }} | |
| run: just test-python-netfx | |
| - name: Python tests run from .NET | |
| run: just test-python-from-dotnet ${{ matrix.os.platform }} |