forked from pythonnet/pythonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (89 loc) · 2.65 KB
/
main.yml
File metadata and controls
112 lines (89 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: GitHub Actions
on: [ pull_request, push ]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [windows, ubuntu, macos]
python: ["3.6", "3.7", "3.8", "3.9"]
steps:
- name: Set Environment on macOS
uses: maxim-lobanov/setup-xamarin@v1
if: ${{ matrix.os == 'macos' }}
with:
mono-version: latest
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.platform }}
- name: Install dependencies
run: |
pip install --upgrade -r requirements.txt
- name: Build and Install
run: |
pip install -v .
- name: Set Python DLL path (non Windows)
if: ${{ matrix.os != 'windows' }}
run: |
python -m pythonnet.find_libpython --export >> $GITHUB_ENV
- name: Set Python DLL path (Windows)
if: ${{ matrix.os == 'windows' }}
run: |
python -m pythonnet.find_libpython --export | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
python-tests:
name: Python Tests
needs: build
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 5
strategy:
matrix:
os: [windows, ubuntu, macos]
runtime: [mono, netcore, netfx]
exclude:
- os: windows
runtime: mono
- os: linux
runtime: netfx
- os: macos
runtime: netfx
steps:
- name: Python Tests
run: pytest --runtime ${{ matrix.runtime }}
domain-reload-tests:
name: Domain Reload Tests
needs: build
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 5
strategy:
matrix:
os: [windows, ubuntu, macos]
steps:
- name: Python Tests
run: pytest src/domain_tests
dotnet-tests:
name: Python Tests
needs: build
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 5
strategy:
matrix:
os: [windows, ubuntu, macos]
platform: [x64]
shutdown_mode: [Normal, Soft]
env:
PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}
steps:
- name: Embedding tests
run: dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/
- name: Python tests run from .NET
run: dotnet test --runtime any-${{ matrix.platform }} src/python_tests_runner/
# TODO: Run perf tests
# TODO: Run mono tests on Windows?