forked from pythonnet/pythonnet
-
Notifications
You must be signed in to change notification settings - Fork 31
58 lines (46 loc) · 1.46 KB
/
Copy pathmain.yml
File metadata and controls
58 lines (46 loc) · 1.46 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
name: Main (x64)
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: Build and Test
runs-on: self-hosted
container:
image: quantconnect/lean:foundation
options: --cpus 12 --memory 12g
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Install dependencies
run: |
pip install --upgrade -r requirements.txt
pip install numpy pytz # for tests
- name: Build and Install
run: |
pip install -v .
- name: Set Python DLL path and PYTHONHOME
run: |
echo PYTHONNET_PYDLL=$(python -m pythonnet.find_libpython) >> $GITHUB_ENV
echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
- name: Embedding tests
run: dotnet test --runtime any-x64 --logger "console;verbosity=detailed" src/embed_tests/
- name: Python Tests (.NET Core)
run: pytest --runtime netcore tests
- name: Python tests run from .NET
run: dotnet test --runtime any-x64 src/python_tests_runner/