-
Notifications
You must be signed in to change notification settings - Fork 7
213 lines (207 loc) · 6.96 KB
/
test.yaml
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: pytest on push
on:
push:
pull_request:
schedule:
- cron: "0 5 * * *"
jobs:
test_lint:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install codecov
if [ -f requirements/lint-requirements.txt ]; then python -m pip install -r requirements/lint-requirements.txt; fi
- name: Print environment info
run: |
./lightgbm_ray/tests/env_info.sh
- name: Run format script
run: |
ls -alp
./format.sh --all
test_linux_ray_master:
runs-on: ubuntu-latest
timeout-minutes: 160
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
include:
- python-version: "3.8"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
- python-version: "3.9"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
- python-version: "3.10"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U ${{ matrix.ray-wheel }}
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install package
run: |
python -m pip install -e .
- name: Print environment info
run: |
./lightgbm_ray/tests/env_info.sh
- name: Run tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 60
max_attempts: 3
command: bash ./run_ci_tests.sh
- name: Run examples
uses: nick-invision/retry@v2
with:
timeout_minutes: 40
max_attempts: 3
command: bash ./run_ci_examples.sh
test_linux_ray_release:
runs-on: ubuntu-latest
timeout-minutes: 160
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U ray
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install package
run: |
python -m pip install -e .
- name: Print environment info
run: |
./lightgbm_ray/tests/env_info.sh
- name: Run tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 60
max_attempts: 3
command: bash ./run_ci_tests.sh
- name: Run examples
uses: nick-invision/retry@v2
with:
timeout_minutes: 40
max_attempts: 3
command: bash ./run_ci_examples.sh
test_linux_compat:
# Test compatibility when some optional libraries are missing
# Test runs on latest ray release
runs-on: ubuntu-latest
timeout-minutes: 160
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U ray
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Uninstall unavailable dependencies
# Disables modin and Ray Tune (via tabulate)
run: |
python -m pip uninstall -y modin
python -m pip uninstall -y tabulate
- name: Install package
run: |
python -m pip install -e .
- name: Print environment info
run: |
./lightgbm_ray/tests/env_info.sh
- name: Run tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 60
max_attempts: 3
command: bash ./run_ci_tests.sh --no-tune
- name: Run examples
uses: nick-invision/retry@v2
with:
timeout_minutes: 40
max_attempts: 3
command: bash ./run_ci_examples.sh --no-tune
test_linux_cutting_edge:
# Tests on cutting edge, i.e. latest Ray master, latest LightGBM master
runs-on: ubuntu-latest
timeout-minutes: 160
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
include:
- python-version: "3.8"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
- python-version: "3.9"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
- python-version: "3.10"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U ${{ matrix.ray-wheel }}
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install Ubuntu system dependencies
run: |
sudo apt-get install -y --no-install-recommends ninja-build
- name: Install package
run: |
python -m pip install -e .
- name: Clone LightGBM repo
uses: actions/checkout@v3
with:
repository: microsoft/LightGBM
path: lightgbm
submodules: true
- name: Install LightGBM from source
shell: bash -l {0}
run: |
pushd ${GITHUB_WORKSPACE}/lightgbm/python-package
python --version
python setup.py sdist
pip install -v ./dist/lightgbm-*.tar.gz
popd
- name: Print environment info
run: |
./lightgbm_ray/tests/env_info.sh
- name: Run tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 60
max_attempts: 3
command: bash ./run_ci_tests.sh
- name: Run examples
uses: nick-invision/retry@v2
with:
timeout_minutes: 40
max_attempts: 3
command: bash ./run_ci_examples.sh