-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathaction.yml
More file actions
89 lines (78 loc) · 2.62 KB
/
action.yml
File metadata and controls
89 lines (78 loc) · 2.62 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
name: 'Run Tests With Wheel Installed'
description: 'Run Unit Tests And Examples With Wheel Installed'
inputs:
os:
description: "operating system"
required: true
runs:
using: "composite"
steps:
- name: Install scapy for MITM tests
shell: bash
run: uv pip install --system scapy==2.*
- name: Install pydivert and pywin32 for MITM tests (Windows)
if: inputs.os == 'Windows'
shell: pwsh
run: uv pip install --system pydivert pywin32
- name: Run C++ Tests (Linux)
if: inputs.os == 'Linux'
shell: bash
run: sudo ./scripts/test.sh
- name: Run C++ Tests (Windows)
if: inputs.os == 'Windows'
shell: pwsh
run: ./scripts/test.ps1 -C Debug
- name: Build Wheel
if: inputs.os != 'Windows'
shell: bash
run: |
uv pip install --system build
python -m build --wheel
- name: Install Wheel
if: inputs.os != 'Windows'
shell: bash
run: |
wheel_file=$(ls dist/*.whl | head -n 1)
echo "Installing wheel: $wheel_file"
uv pip install --system "$wheel_file"
- name: Run Unittests
if: inputs.os != 'Windows'
shell: bash
run: |
python -m unittest discover -v tests
- name: Run Examples
if: inputs.os != 'Windows'
shell: bash
run: |
uv pip install --system -r examples/applications/requirements_applications.txt
uv pip install --system -r examples/ray_compat/requirements.txt
readarray -t skip_examples < examples/skip_examples.txt
for example in "./examples"/*.py; do
filename=$(basename "$example")
if [[ " ${skip_examples[*]} " =~ [[:space:]]${filename}[[:space:]] ]]; then
echo "Skipping $example"
continue
fi
echo "Running $example"
python $example
done
readarray -t skip_tests < examples/ray_compat/skip_tests.txt
for example in "./examples/ray_compat"/*.py; do
filename=$(basename "$example")
if [[ " ${skip_tests[*]} " =~ [[:space:]]${filename}[[:space:]] ]]; then
echo "Skipping $example"
continue
fi
echo "Running $example"
python $example
done
for example in "./examples/applications"/*.py; do
if python -c 'import sys; sys.exit(not sys.version_info <= (3, 10))'; then
if [ "$example" = "./examples/applications/yfinance_historical_price.py" ]; then
echo "Skipping $example"
continue;
fi
fi
echo "Running $example"
python $example
done