1- name : Test
1+ name : Test
22
33on :
44 push :
1313 strategy :
1414 matrix :
1515 os : [windows-latest, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
16- python-version : [3.6, 3.7, 3.8, 3.9 ]
16+ python-version : [3.6, 3.7, 3.8]
1717
1818 steps :
1919 - uses : actions/checkout@v2
@@ -25,90 +25,88 @@ jobs:
2525
2626 - name : Lint with Black
2727 run : |
28- cd ..
2928 if [ "$RUNNER_OS" == "Windows" ]; then
30- $CONDA\\ python.exe -m pip install black
31- $CONDA\\ python.exe -m black qlib -l 120 --check --diff
29+ python.exe -m pip install black
30+ python.exe -m black qlib -l 120 --check --diff
3231 else
33- sudo $CONDA/bin/ python -m pip install black
34- $CONDA/bin/ python -m black qlib -l 120 --check --diff
32+ python -m pip install black
33+ python -m black qlib -l 120 --check --diff
3534 fi
3635 shell : bash
3736
38- # Test Qlib installed with pip
3937 - name : Install Qlib with pip
4038 run : |
4139 if [ "$RUNNER_OS" == "Windows" ]; then
42- $CONDA\\ python.exe -m pip install numpy==1.19.5
43- $CONDA\\ python.exe -m pip install pyqlib --ignore-installed ruamel.yaml numpy --user
40+ python.exe -m pip install numpy==1.19.5
41+ python.exe -m pip install pyqlib --ignore-installed ruamel.yaml numpy --user
4442 else
45- sudo $CONDA/bin/ python -m pip install numpy==1.19.5
46- sudo $CONDA/bin/ python -m pip install pyqlib --ignore-installed ruamel.yaml numpy
43+ python -m pip install numpy==1.19.5
44+ python -m pip install pyqlib --ignore-installed ruamel.yaml numpy
4745 fi
4846 shell : bash
4947
5048 - name : Test data downloads
5149 run : |
5250 if [ "$RUNNER_OS" == "Windows" ]; then
53- $CONDA\\ python.exe scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
51+ python.exe scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
5452 else
55- $CONDA/bin/ python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
53+ python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
5654 fi
5755 shell : bash
5856
5957 - name : Test workflow by config (install from pip)
6058 run : |
6159 if [ "$RUNNER_OS" == "Windows" ]; then
62- $CONDA\\ python.exe qlib\\workflow\\cli.py examples\\benchmarks\\LightGBM\\workflow_config_lightgbm_Alpha158.yaml
63- $CONDA\\ python.exe -m pip uninstall -y pyqlib
60+ python.exe qlib\\workflow\\cli.py examples\\benchmarks\\LightGBM\\workflow_config_lightgbm_Alpha158.yaml
61+ python.exe -m pip uninstall -y pyqlib
6462 else
65- $CONDA/bin/ python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
66- sudo $CONDA/bin/ python -m pip uninstall -y pyqlib
63+ python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
64+ python -m pip uninstall -y pyqlib
6765 fi
6866 shell : bash
69-
70- # Test Qlib installed from source
67+
68+ # Test Qlib installed from source
7169 - name : Install Qlib from source
7270 run : |
7371 if [ "$RUNNER_OS" == "Windows" ]; then
74- $CONDA\\ python.exe -m pip install --upgrade cython
75- $CONDA\\ python.exe -m pip install numpy jupyter jupyter_contrib_nbextensions
76- $CONDA\\ python.exe -m pip install -U scipy scikit-learn # installing without this line will cause errors on GitHub Actions, while instsalling locally won't
77- $CONDA\\ python.exe setup.py install
72+ python.exe -m pip install --upgrade cython
73+ python.exe -m pip install numpy jupyter jupyter_contrib_nbextensions
74+ python.exe -m pip install -U scipy scikit-learn # installing without this line will cause errors on GitHub Actions, while instsalling locally won't
75+ python.exe setup.py install
7876 else
79- sudo $CONDA/bin/ python -m pip install --upgrade cython
80- sudo $CONDA/bin/ python -m pip install numpy jupyter jupyter_contrib_nbextensions
81- sudo $CONDA/bin/ python -m pip install -U scipy scikit-learn # installing without this line will cause errors on GitHub Actions, while instsalling locally won't
82- sudo $CONDA/bin/ python setup.py install
77+ python -m pip install --upgrade cython
78+ python -m pip install numpy jupyter jupyter_contrib_nbextensions
79+ python -m pip install -U scipy scikit-learn # installing without this line will cause errors on GitHub Actions, while instsalling locally won't
80+ python setup.py install
8381 fi
8482 shell : bash
8583
8684 - name : Install test dependencies
8785 run : |
8886 if [ "$RUNNER_OS" == "Windows" ]; then
89- $CONDA\\ python.exe -m pip install --upgrade pip
90- $CONDA\\ python.exe -m pip install black pytest
87+ python.exe -m pip install --upgrade pip
88+ python.exe -m pip install black pytest
9189 else
92- sudo $CONDA/bin/ python -m pip install --upgrade pip
93- sudo $CONDA/bin/ python -m pip install black pytest
90+ python -m pip install --upgrade pip
91+ python -m pip install black pytest
9492 fi
95- shell : bash
93+ shell : bash
9694
9795 - name : Unit tests with Pytest
9896 run : |
9997 cd tests
10098 if [ "$RUNNER_OS" == "Windows" ]; then
101- $CONDA\\ python.exe -m pytest . --durations=0
99+ python.exe -m pytest . --durations=0
102100 else
103- $CONDA/bin/ python -m pytest . --durations=0
101+ python -m pytest . --durations=0
104102 fi
105103 shell : bash
106104
107105 - name : Test workflow by config (install from source)
108106 run : |
109107 if [ "$RUNNER_OS" == "Windows" ]; then
110- $CONDA\\ python.exe qlib\\workflow\\cli.py examples\\benchmarks\\LightGBM\\workflow_config_lightgbm_Alpha158.yaml
108+ python.exe qlib\\workflow\\cli.py examples\\benchmarks\\LightGBM\\workflow_config_lightgbm_Alpha158.yaml
111109 else
112- $CONDA/bin/ python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
110+ python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
113111 fi
114112 shell : bash
0 commit comments