Update qbot-release.yml #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
timeout-minutes: 180 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=18 --max-line-length=127 --statistics | |
# https://github.com/python/mypy/issues/10600 | |
- name: Check Qlib with mypy | |
run: | | |
mypy qlib --install-types --non-interactive || true | |
mypy qlib --verbose | |
- name: Check Qlib ipynb with nbqa | |
run: | | |
nbqa black . -l 120 --check --diff | |
nbqa pylint . --disable=C0104,C0114,C0115,C0116,C0301,C0302,C0411,C0413,C1802,R0401,R0801,R0902,R0903,R0911,R0912,R0913,R0914,R0915,R1720,W0105,W0123,W0201,W0511,W0613,W1113,W1514,E0401,E1121,C0103,C0209,R0402,R1705,R1710,R1725,R1735,W0102,W0212,W0221,W0223,W0231,W0237,W0612,W0621,W0622,W0703,W1309,E1102,E1136,W0719,W0104,W0404,C0412,W0611,C0410 --const-rgx='[a-z_][a-z0-9_]{2,30}$' | |
- name: Test with pytest | |
run: | | |
pytest | |
# Run after data downloads | |
- name: Check Qlib ipynb with nbconvert | |
run: | | |
# add more ipynb files in future | |
jupyter nbconvert --to notebook --execute pytrader/strategies/workflow_by_code.ipynb | |
- name: Test workflow by config (install from source) | |
run: | | |
python -m pip install numba | |
python .github/scripts/qlib_workflow_cli.py pytrader/strategies/benchmarks/LightGBM/workflow_config_lightgbm_Alpha158.yaml | |