mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-17 09:24:34 +08:00
macos-test-ci split out separately
This commit is contained in:
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-latest]
|
os: [windows-latest, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
|
||||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -46,14 +46,6 @@ jobs:
|
|||||||
sudo $CONDA/bin/python -m pip install pyqlib --ignore-installed ruamel.yaml numpy
|
sudo $CONDA/bin/python -m pip install pyqlib --ignore-installed ruamel.yaml numpy
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Install Lightgbm and Upgrade openssl for MacOS
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: |
|
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
|
||||||
brew upgrade openssl
|
|
||||||
sudo $CONDA/bin/python -m pip install -U pyopenssl idna
|
|
||||||
|
|
||||||
- name: Test data downloads
|
- name: Test data downloads
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
72
.github/workflows/test_macos.yml
vendored
Normal file
72
.github/workflows/test_macos.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
name: Test MacOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Lint with Black
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
sudo $CONDA/bin/python -m pip install black
|
||||||
|
$CONDA/bin/python -m black qlib -l 120 --check --diff
|
||||||
|
|
||||||
|
# Test Qlib installed with pip
|
||||||
|
- name: Install Qlib with pip
|
||||||
|
run: |
|
||||||
|
sudo $CONDA/bin/python -m pip install numpy==1.19.5
|
||||||
|
sudo $CONDA/bin/python -m pip install pyqlib --ignore-installed ruamel.yaml numpy
|
||||||
|
|
||||||
|
- name: Install Lightgbm for MacOS
|
||||||
|
run: |
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Microsoft/qlib/main/.github/brew_install.sh)"
|
||||||
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install lightgbm
|
||||||
|
|
||||||
|
- name: Test data downloads
|
||||||
|
run: |
|
||||||
|
$CONDA/bin/python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
|
||||||
|
|
||||||
|
- name: Test workflow by config (install from pip)
|
||||||
|
run: |
|
||||||
|
$CONDA/bin/python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
|
||||||
|
sudo $CONDA/bin/python -m pip uninstall -y pyqlib
|
||||||
|
|
||||||
|
# Test Qlib installed from source
|
||||||
|
- name: Install Qlib from source
|
||||||
|
run: |
|
||||||
|
sudo $CONDA/bin/python -m pip install --upgrade cython
|
||||||
|
sudo $CONDA/bin/python -m pip install numpy jupyter jupyter_contrib_nbextensions
|
||||||
|
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
|
||||||
|
sudo $CONDA/bin/python setup.py install
|
||||||
|
|
||||||
|
- name: Install test dependencies
|
||||||
|
run: |
|
||||||
|
sudo $CONDA/bin/python -m pip install --upgrade pip
|
||||||
|
sudo $CONDA/bin/python -m pip install -U pyopenssl idna
|
||||||
|
sudo $CONDA/bin/python -m pip install black pytest
|
||||||
|
|
||||||
|
- name: Unit tests with Pytest
|
||||||
|
run: |
|
||||||
|
cd tests
|
||||||
|
$CONDA/bin/python -m pytest . --durations=0
|
||||||
|
|
||||||
|
- name: Test workflow by config (install from source)
|
||||||
|
run: |
|
||||||
|
$CONDA/bin/python qlib/workflow/cli.py examples/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml
|
||||||
Reference in New Issue
Block a user