Skip to content

Commit a6700d8

Browse files
authored
Update test_qlib_from_source_slow.yml's timeout setting. (#1178)
* Update test_qlib_from_source_slow.yml * Update test_qlib_from_source.yml * Update test_pit.py * Update test_pit.py * Update test_pit.py * Update test_pit.py
1 parent 623774d commit a6700d8

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/test_qlib_from_source.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88

99
jobs:
1010
build:
11-
timeout-minutes: 120
11+
timeout-minutes: 180
12+
# we may retry for 3 times for `Unit tests with Pytest`
1213

1314
runs-on: ${{ matrix.os }}
1415
strategy:
@@ -145,6 +146,10 @@ jobs:
145146
python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
146147
147148
- name: Unit tests with Pytest
148-
run: |
149-
cd tests
150-
python -m pytest . -m "not slow" --durations=0
149+
uses: nick-fields/retry@v2
150+
with:
151+
timeout_minutes: 60
152+
max_attempts: 3
153+
command: |
154+
cd tests
155+
python -m pytest . -m "not slow" --durations=0

.github/workflows/test_qlib_from_source_slow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88

99
jobs:
1010
build:
11-
timeout-minutes: 120
11+
timeout-minutes: 360
12+
# we may retry for 3 times for `Unit tests with Pytest`
1213

1314
runs-on: ${{ matrix.os }}
1415
strategy:

tests/test_pit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ def setUpClass(cls) -> None:
3939
cn_data_dir = str(QLIB_DIR.joinpath("cn_data").resolve())
4040
pit_dir = str(SOURCE_DIR.joinpath("pit").resolve())
4141
pit_normalized_dir = str(SOURCE_DIR.joinpath("pit_normalized").resolve())
42-
GetData().qlib_data(name="qlib_data_simple", target_dir=cn_data_dir, region="cn")
43-
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit")
42+
GetData().qlib_data(
43+
name="qlib_data_simple", target_dir=cn_data_dir, region="cn", delete_old=False, exists_skip=True
44+
)
45+
GetData().qlib_data(name="qlib_data", target_dir=pit_dir, region="pit", delete_old=False, exists_skip=True)
4446

4547
# NOTE: This code does the same thing as line 43, but since baostock is not stable in downloading data, we have chosen to download offline data.
4648
# bs.login()

0 commit comments

Comments
 (0)