1
+ name : Python SDK Tests
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches : [ main ]
7
+ tags : ["v*"]
8
+ paths :
9
+ - ' sdks/python/test-optimization-sdk/**'
10
+ pull_request :
11
+ branches : [ main ]
12
+ paths :
13
+ - ' sdks/python/test-optimization-sdk/**'
14
+
15
+ jobs :
16
+ linux-amd64-test :
17
+ name : Run Python SDK Tests on Linux AMD64
18
+ runs-on : ubuntu-latest
19
+ defaults :
20
+ run :
21
+ working-directory : sdks/python/test-optimization-sdk
22
+
23
+ steps :
24
+ - name : Checkout repository
25
+ uses : actions/checkout@v4
26
+
27
+ - name : Set up Python
28
+ uses : actions/setup-python@v4
29
+ with :
30
+ python-version : ' 3.10'
31
+
32
+ - name : Install dependencies
33
+ run : |
34
+ python -m pip install --upgrade pip
35
+ pip install -e .
36
+ pip install pytest
37
+
38
+ - name : Run tests
39
+ run : pytest --capture=no
40
+
41
+ linux-arm64-test :
42
+ name : Run Python SDK Tests on Linux ARM64
43
+ runs-on : ubuntu-latest
44
+ defaults :
45
+ run :
46
+ working-directory : sdks/python/test-optimization-sdk
47
+
48
+ steps :
49
+ - name : Checkout repository
50
+ uses : actions/checkout@v4
51
+
52
+ - name : Set up QEMU
53
+ uses : docker/setup-qemu-action@v3
54
+
55
+ - name : Set up Docker Buildx
56
+ uses : docker/setup-buildx-action@v3
57
+
58
+ - name : Build and run tests
59
+ run : |
60
+ docker buildx build --platform linux/arm64 -t python-test-optimization-sdk-test . --load
61
+ docker run python-test-optimization-sdk-test
62
+
63
+ macos-test :
64
+ name : Run Python SDK Tests on macOS
65
+ runs-on : macos-latest
66
+ defaults :
67
+ run :
68
+ working-directory : sdks/python/test-optimization-sdk
69
+
70
+ steps :
71
+ - name : Checkout repository
72
+ uses : actions/checkout@v4
73
+
74
+ - name : Set up Python
75
+ uses : actions/setup-python@v4
76
+ with :
77
+ python-version : ' 3.10'
78
+
79
+ - name : Install dependencies
80
+ run : |
81
+ python -m pip install --upgrade pip
82
+ pip install -e .
83
+ pip install pytest
84
+
85
+ - name : Run tests
86
+ run : pytest --capture=no
87
+
88
+ windows-test :
89
+ name : Run Python SDK Tests on Windows
90
+ runs-on : windows-latest
91
+ defaults :
92
+ run :
93
+ working-directory : sdks/python/test-optimization-sdk
94
+
95
+ steps :
96
+ - name : Checkout repository
97
+ uses : actions/checkout@v4
98
+
99
+ - name : Set up Python
100
+ uses : actions/setup-python@v4
101
+ with :
102
+ python-version : ' 3.10'
103
+
104
+ - name : Install dependencies
105
+ run : |
106
+ python -m pip install --upgrade pip
107
+ pip install -e .
108
+ pip install pytest
109
+
110
+ - name : Run tests
111
+ run : pytest --capture=no
0 commit comments