Temp fix inf value #4402
Workflow file for this run
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
name: Automated test suite | |
on: | |
push: | |
branches: [ master ] | |
tags: [ v* ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
automated-test-suite: | |
timeout-minutes: 40 | |
# Use paid faster Github Actions runner | |
runs-on: | |
group: Beefy runners | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
# Do not let Poetry to install again if we do not detect a lock file change | |
- name: Load cached venv | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
# Speed up testing by not downloading integration test data from the production server | |
# https://github.com/actions/cache | |
# See conftest.persistent_test_client | |
- name: Cache datasetes | |
id: cache-datasets-load | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/trading-strategy-tests | |
key: cache-datasets | |
# Needed for Anvil | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
# pick a nightly release from: https://github.com/foundry-rs/foundry/releases | |
version: 'nightly-de33b6af53005037b463318d2628b5cfcaf39916' | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install --no-interaction --all-extras | |
# Run testa parallel, do not run slow tests before Docker image build. | |
# Note that we limit concurrency to 2 workers as 4 workers crashed without an error message on Github CI. | |
# I suspect out of memory situation that is not reported to the user. | |
# Print 20 slowest tests when done. | |
# tests/**/test*.py -> workaround issues by scanning tests folder in git submodules and importing them (even if not running) | |
- name: Run test scripts | |
run: | | |
poetry run pytest --tb=native --dist loadscope -n 6 --durations=20 -m "not slow_test_group" --timeout=300 | |
env: | |
TRADING_STRATEGY_API_KEY: ${{ secrets.TRADING_STRATEGY_API_KEY }} | |
BNB_CHAIN_JSON_RPC: ${{ secrets.BNB_CHAIN_JSON_RPC }} | |
# https://stackoverflow.com/a/75274358/315168 | |
PYDEVD_DISABLE_FILE_VALIDATION: 1 | |
JSON_RPC_POLYGON: ${{ secrets.JSON_RPC_POLYGON }} | |
JSON_RPC_POLYGON_ARCHIVE: ${{ secrets.JSON_RPC_POLYGON_ARCHIVE }} | |
- name: Save datasets | |
id: cache-datasets-save | |
uses: actions/cache/save@v4 | |
with: | |
path: ~/.cache/trading-strategy-tests | |
key: cache-datasets |