Update chains #1620
This file contains hidden or 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 ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| automated-tests: | |
| runs-on: | |
| group: Beefy runners | |
| timeout-minutes: 30 # Set timeout for entire job | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python 3.14 | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: | | |
| poetry install --all-extras --no-interaction | |
| # 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 | |
| - name: Run test scripts | |
| timeout-minutes: 15 # Set timeout for specific step | |
| run: | | |
| poetry run pytest -vv --tb=native -n 4 | |
| env: | |
| TRADING_STRATEGY_API_KEY: ${{ secrets.TRADING_STRATEGY_API_KEY }} | |
| BASE_BINANCE_API_URL: ${{ secrets.BASE_BINANCE_API_URL }} | |
| BASE_BINANCE_MARGIN_API_URL: ${{ secrets.BASE_BINANCE_MARGIN_API_URL }} | |
| - name: Save datasets | |
| id: cache-datasets-save | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.cache/trading-strategy-tests | |
| key: cache-datasets | |