Skip to content

Commit 0764612

Browse files
committed
Split tests into different steps
1 parent 6510ff7 commit 0764612

File tree

1 file changed

+51
-16
lines changed

1 file changed

+51
-16
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@ name: GitHub Actions
33
on: [ pull_request, push ]
44

55
jobs:
6-
build-test:
7-
name: Build and Test
6+
build:
7+
name: Build
88
runs-on: ${{ matrix.os }}-latest
9-
timeout-minutes: 5
109

1110
strategy:
1211
fail-fast: false
1312
matrix:
1413
os: [windows, ubuntu, macos]
1514
python: ["3.6", "3.7", "3.8", "3.9"]
16-
platform: [x64]
17-
shutdown_mode: [Normal, Soft]
18-
19-
env:
20-
PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}
2115

2216
steps:
2317
- name: Set Environment on macOS
@@ -56,17 +50,58 @@ jobs:
5650
run: |
5751
python -m pythonnet.find_libpython --export | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5852
59-
- name: Python Tests (Mono)
60-
if: ${{ matrix.os != 'windows' }}
61-
run: pytest --runtime mono
53+
python-tests:
54+
name: Python Tests
55+
needs: build
56+
runs-on: ${{ matrix.os }}-latest
57+
timeout-minutes: 5
6258

63-
- name: Python Tests (.NET Core)
64-
run: pytest --runtime netcore
59+
strategy:
60+
matrix:
61+
os: [windows, ubuntu, macos]
62+
runtime: [mono, netcore, netfx]
63+
exclude:
64+
- os: windows
65+
runtime: mono
66+
- os: linux
67+
runtime: netfx
68+
- os: macos
69+
runtime: netfx
6570

66-
- name: Python Tests (.NET Framework)
67-
if: ${{ matrix.os == 'windows' }}
68-
run: pytest --runtime netfx
71+
steps:
72+
- name: Python Tests
73+
run: pytest --runtime ${{ matrix.runtime }}
74+
75+
domain-reload-tests:
76+
name: Domain Reload Tests
77+
needs: build
78+
runs-on: ${{ matrix.os }}-latest
79+
timeout-minutes: 5
80+
81+
strategy:
82+
matrix:
83+
os: [windows, ubuntu, macos]
84+
85+
steps:
86+
- name: Python Tests
87+
run: pytest src/domain_tests
88+
89+
dotnet-tests:
90+
name: Python Tests
91+
needs: build
92+
runs-on: ${{ matrix.os }}-latest
93+
timeout-minutes: 5
94+
95+
strategy:
96+
matrix:
97+
os: [windows, ubuntu, macos]
98+
platform: [x64]
99+
shutdown_mode: [Normal, Soft]
69100

101+
env:
102+
PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}
103+
104+
steps:
70105
- name: Embedding tests
71106
run: dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/
72107

0 commit comments

Comments
 (0)