mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-16 01:06:56 +08:00
Update test CI
This commit is contained in:
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
@@ -12,8 +12,8 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-16.04, ubuntu-18.04, windows-latest, macos-latest]
|
os: [windows-latest, ubuntu-16.04, ubuntu-18.04, macos-latest]
|
||||||
python-version: [3.5, 3.6, 3.7, 3.8]
|
python-version: [3.6, 3.7, 3.8]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -27,14 +27,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pip install --upgrade cython
|
pip install --upgrade cython
|
||||||
pip install numpy jupyter jupyter_contrib_nbextensions
|
pip install numpy jupyter jupyter_contrib_nbextensions
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
|
||||||
|
- name: Install Lightgbm for MacOS
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||||
|
brew install lightgbm
|
||||||
|
|
||||||
- name: Install test dependencies
|
- name: Install test dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install flake8 pytest
|
pip install flake8 pytest
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
|
|
||||||
- name: Lint with flake8
|
- name: Lint with flake8
|
||||||
run: |
|
run: |
|
||||||
@@ -43,13 +47,14 @@ jobs:
|
|||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Unit tests with Pytest
|
||||||
run: |
|
run: |
|
||||||
pytest ../qlib
|
cd tests
|
||||||
|
pytest . --duration==0
|
||||||
|
|
||||||
- name: Test data downloads and examples
|
- name: Test data downloads and examples
|
||||||
run: |
|
run: |
|
||||||
python scripts/get_data.py qlib_data_cn --target_dir ~/.qlib/qlib_data/cn_data
|
python scripts/get_data.py qlib_data_cn --target_dir ~/.qlib/qlib_data/cn_data
|
||||||
cd examples
|
cd examples
|
||||||
estimator -c estimator/estimator_config.yaml
|
estimator -c estimator/estimator_config.yaml
|
||||||
jupyter nbconvert --execute estimator/analyze_from_estimator.ipynb
|
jupyter nbconvert --execute estimator/analyze_from_estimator.ipynb --to html
|
||||||
Reference in New Issue
Block a user