| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,6 +56,9 @@ jobs: | |||
| 56 | 56 | - name: Checkout code | |
| 57 | 57 | uses: actions/checkout@v7 | |
| 58 | 58 | ||
| 59 | + - name: Setup just | ||
| 60 | + uses: extractions/setup-just@v4 | ||
| 61 | + | ||
| 59 | 62 | # Use main until support for architecture lands | |
| 60 | 63 | - name: Setup .NET | |
| 61 | 64 | uses: actions/setup-dotnet@main | |
@@ -83,25 +86,25 @@ jobs: | |||
| 83 | 86 | ||
| 84 | 87 | - name: Embedding tests (Mono/.NET Framework) | |
| 85 | 88 | if: always() | |
| 86 | - run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/ | ||
| 89 | + run: just test-embed-mono ${{ matrix.os.platform }} | ||
| 87 | 90 | env: | |
| 88 | 91 | MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466 | |
| 89 | 92 | ||
| 90 | 93 | - name: Embedding tests (.NET Core) | |
| 91 | 94 | if: always() | |
| 92 | - run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net10.0 --logger "console;verbosity=detailed" src/embed_tests/ | ||
| 95 | + run: just test-embed-core ${{ matrix.os.platform }} | ||
| 93 | 96 | ||
| 94 | 97 | - name: Python Tests (.NET Core) | |
| 95 | 98 | if: always() | |
| 96 | - run: pytest --runtime coreclr | ||
| 99 | + run: just test-python-coreclr | ||
| 97 | 100 | ||
| 98 | 101 | - name: Python Tests (Mono) | |
| 99 | 102 | if: always() | |
| 100 | - run: pytest --runtime mono | ||
| 103 | + run: just test-python-mono | ||
| 101 | 104 | ||
| 102 | 105 | - name: Python Tests (.NET Framework) | |
| 103 | 106 | if: ${{ matrix.os.category == 'windows' }} | |
| 104 | - run: pytest --runtime netfx | ||
| 107 | + run: just test-python-netfx | ||
| 105 | 108 | ||
| 106 | 109 | - name: Python tests run from .NET | |
| 107 | - run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/ | ||
| 110 | + run: just test-python-from-dotnet ${{ matrix.os.platform }} | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,9 @@ jobs: | |||
| 23 | 23 | - name: Checkout code | |
| 24 | 24 | uses: actions/checkout@v7 | |
| 25 | 25 | ||
| 26 | + - name: Setup just | ||
| 27 | + uses: extractions/setup-just@v4 | ||
| 28 | + | ||
| 26 | 29 | - name: Setup .NET | |
| 27 | 30 | uses: actions/setup-dotnet@v6 | |
| 28 | 31 | with: | |
@@ -44,10 +47,10 @@ jobs: | |||
| 44 | 47 | echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV | |
| 45 | 48 | ||
| 46 | 49 | - name: Python Tests | |
| 47 | - run: pytest | ||
| 50 | + run: just test-python | ||
| 48 | 51 | ||
| 49 | 52 | - name: Embedding tests | |
| 50 | - run: dotnet test --runtime any-ubuntu src/embed_tests/ | ||
| 53 | + run: just test-embed any-ubuntu | ||
| 51 | 54 | ||
| 52 | 55 | - name: Pack | |
| 53 | 56 | run: dotnet pack --configuration Release --version-suffix preview${{env.DATE_VER}} --output "Release-Preview" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,8 @@ | |||
| 1 | 1 | default: | |
| 2 | 2 | @just --choose | |
| 3 | 3 | ||
| 4 | + default_platform := if arch() == "x86_64" { "x64" } else if arch() == "aarch64" { "arm64" } else { arch() } | ||
| 5 | + | ||
| 4 | 6 | setup: | |
| 5 | 7 | dotnet restore | |
| 6 | 8 | uv sync | |
@@ -11,4 +13,40 @@ docs: | |||
| 11 | 13 | ||
| 12 | 14 | build-wheels: | |
| 13 | 15 | uv build | |
| 14 | - uv build --wheel -C="--global-option=--net46-support" | ||
| 16 | + uv build --wheel -C="--global-option=--net46-support" | ||
| 17 | + | ||
| 18 | + # Run default tests (.NET Core Python and embedding tests) | ||
| 19 | + test: test-python-coreclr test-embed-core | ||
| 20 | + | ||
| 21 | + # Run Python tests (default or pass options like --runtime coreclr) | ||
| 22 | + test-python *args: | ||
| 23 | + uv run pytest {{ args }} | ||
| 24 | + | ||
| 25 | + # Run Python tests with .NET Core | ||
| 26 | + test-python-coreclr *args: | ||
| 27 | + uv run pytest --runtime coreclr {{ args }} | ||
| 28 | + | ||
| 29 | + # Run Python tests with Mono | ||
| 30 | + test-python-mono *args: | ||
| 31 | + uv run pytest --runtime mono {{ args }} | ||
| 32 | + | ||
| 33 | + # Run Python tests with .NET Framework | ||
| 34 | + test-python-netfx *args: | ||
| 35 | + uv run pytest --runtime netfx {{ args }} | ||
| 36 | + | ||
| 37 | + # Run Python tests executed via .NET test runner | ||
| 38 | + test-python-from-dotnet platform=default_platform *args: | ||
| 39 | + dotnet test --runtime any-{{ platform }} src/python_tests_runner/ {{ args }} | ||
| 40 | + | ||
| 41 | + # Run embedding tests | ||
| 42 | + test-embed runtime=("any-" + default_platform) *args: | ||
| 43 | + dotnet test --runtime {{ runtime }} src/embed_tests/ {{ args }} | ||
| 44 | + | ||
| 45 | + # Run embedding tests with .NET Core | ||
| 46 | + test-embed-core platform=default_platform *args: | ||
| 47 | + dotnet test --runtime any-{{ platform }} --framework net10.0 --logger "console;verbosity=detailed" src/embed_tests/ {{ args }} | ||
| 48 | + | ||
| 49 | + # Run embedding tests with Mono / .NET Framework | ||
| 50 | + [env("MONO_THREADS_SUSPEND", "preemptive")] | ||
| 51 | + test-embed-mono platform=default_platform *args: | ||
| 52 | + dotnet test --runtime any-{{ platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/ {{ args }} | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments