Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee990b7

Browse files
committed
Adjust workflows
- Build tests explicitly - Build test fixtures from the pytest call - Run tests with dotnet test - Reset solution file - Always run full test matrix Note: Newer .NET runs Mono tests as well as .NET Core tests if both target frameworks are defined.
1 parent 6f97bdd commit ee990b7

File tree

3 files changed

+136
-238
lines changed

3 files changed

+136
-238
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,23 @@ on: [ pull_request, push ]
55
jobs:
66
build-test:
77
name: Build and Test
8-
runs-on: ubuntu-16.04
8+
runs-on: ubuntu-latest
99

1010
strategy:
11+
fail-fast: false
1112
matrix:
12-
python: [3.6,3.7,3.8,3.9]
13-
shutdown_mode: [Normal,Soft]
14-
toolset: [Mono,.NET]
15-
include:
16-
- toolset: .NET
17-
BUILD_OPTS: --xplat
18-
RUN_TESTS: dotnet
19-
EMBED_TESTS_PATH: netcoreapp3.1_publish/
20-
PERF_TESTS_PATH: net461/
21-
- toolset: Mono
22-
BUILD_OPTS: ""
23-
RUN_TESTS: "mono ./packages/NUnit.*/tools/nunit3-console.exe"
24-
EMBED_TESTS_PATH: ""
25-
PERF_TESTS_PATH: ""
26-
13+
python: [3.6, 3.7, 3.8, 3.9]
14+
shutdown_mode: [Normal, Soft]
15+
2716
env:
28-
BUILD_OPTS: ${{ matrix.BUILD_OPTS }}
29-
RUN_TESTS: ${{ matrix.RUN_TESTS }}
30-
EMBED_TESTS_PATH: ${{ matrix.EMBED_TESTS_PATH }}
31-
PERF_TESTS_PATH: ${{ matrix.PERF_TESTS_PATH }}
3217
PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}
3318

3419
steps:
3520
- name: Checkout code
3621
uses: actions/checkout@v2
3722

38-
- name: Install Mono
39-
if: ${{ matrix.toolset == 'Mono' }}
40-
run: |
41-
sudo apt update
42-
sudo apt install mono-devel ca-certificates-mono -y
43-
44-
- name: Install .NET
45-
if: ${{ matrix.toolset == '.NET' }}
23+
- name: Setup .NET
4624
uses: actions/setup-dotnet@v1
47-
with:
48-
dotnet-version: 3.1.x
4925

5026
- name: Set up Python ${{ matrix.python }}
5127
uses: actions/setup-python@v2
@@ -54,16 +30,19 @@ jobs:
5430

5531
- name: Install dependencies
5632
run: |
57-
pip install --upgrade setuptools # TEMP - due to setuptools 36.2.0 bug
5833
pip install --upgrade -r requirements.txt
5934
60-
- name: Install
35+
- name: Build and Install
6136
run: |
62-
echo $BUILD_OPTS
63-
python setup.py install $BUILD_OPTS
37+
python setup.py configure
38+
pip install -v .
6439
6540
- name: Python Tests
6641
run: pytest
6742

68-
- name: .NET Tests
69-
run: $RUN_TESTS src/embed_tests/bin/$EMBED_TESTS_PATH/Python.EmbeddingTest.dll --labels=All
43+
- name: Run Embedding tests
44+
run: dotnet test src/embed_tests/
45+
46+
# TODO: Run perf tests
47+
# TODO: Run tests on macos and windows as well
48+
# TODO: Run tests on Windows on .NET Framework

0 commit comments

Comments
 (0)