Skip to content

CI Tests

CI Tests #144

Workflow file for this run

name: CI Tests
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 9 * * 6"
jobs:
black-format:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --diff"
src: "./src ./tests"
version: '24.1'
flake8-lint:
name: Lint Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: flake8 Lint
uses: py-actions/flake8@v2
tests:
name: Unit Tests for ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout Zipline
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install TA-Lib
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo ./tools/install_talib.sh
- name: Install TA-Lib HDF5 c-blosc
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install ta-lib
brew install hdf5
brew install c-blosc
- name: Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
- name: Install TA-Lib
if: ${{ matrix.os == 'windows-latest' }}
run: |
./tools/install_talib.bat
- name: Install Zipline
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions
python -m pip install .[test]
- name: Unittests with tox & pytest
uses: nick-fields/retry@v3
with:
timeout_minutes: 90
max_attempts: 3
retry_on: error
new_command_on_retry: python -m pip install tox tox-gh-actions .[test]
command: tox