◐ Shell
clean mode source ↗

Convert projects to SDK style by filmor · Pull Request #1209 · pythonnet/pythonnet

Expand Up @@ -5,47 +5,23 @@ on: [ pull_request, push ] jobs: build-test: name: Build and Test runs-on: ubuntu-16.04 runs-on: ubuntu-latest
Comment thread

filmor marked this conversation as resolved.


strategy: fail-fast: false matrix: python: [3.6,3.7,3.8,3.9] shutdown_mode: [Normal,Soft] toolset: [Mono,.NET] include: - toolset: .NET BUILD_OPTS: --xplat RUN_TESTS: dotnet EMBED_TESTS_PATH: netcoreapp3.1_publish/ PERF_TESTS_PATH: net461/ - toolset: Mono BUILD_OPTS: "" RUN_TESTS: "mono ./packages/NUnit.*/tools/nunit3-console.exe" EMBED_TESTS_PATH: "" PERF_TESTS_PATH: ""
python: [3.6, 3.7, 3.8, 3.9] shutdown_mode: [Normal, Soft]
env: BUILD_OPTS: ${{ matrix.BUILD_OPTS }} RUN_TESTS: ${{ matrix.RUN_TESTS }} EMBED_TESTS_PATH: ${{ matrix.EMBED_TESTS_PATH }} PERF_TESTS_PATH: ${{ matrix.PERF_TESTS_PATH }} PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}
steps: - name: Checkout code uses: actions/checkout@v2
- name: Install Mono if: ${{ matrix.toolset == 'Mono' }} run: | sudo apt update sudo apt install mono-devel ca-certificates-mono -y
- name: Install .NET if: ${{ matrix.toolset == '.NET' }} - name: Setup .NET uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.x
- name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v2 Expand All @@ -54,16 +30,19 @@ jobs:
- name: Install dependencies run: | pip install --upgrade setuptools # TEMP - due to setuptools 36.2.0 bug pip install --upgrade -r requirements.txt
- name: Install - name: Build and Install run: | echo $BUILD_OPTS python setup.py install $BUILD_OPTS python setup.py configure pip install -v .
- name: Python Tests run: pytest
- name: .NET Tests run: $RUN_TESTS src/embed_tests/bin/$EMBED_TESTS_PATH/Python.EmbeddingTest.dll --labels=All - name: Run Embedding tests run: dotnet test src/embed_tests/
# TODO: Run perf tests # TODO: Run tests on macos and windows as well # TODO: Run tests on Windows on .NET Framework