feat(roi): include off-chain BalanceTracker pre-deposits in trader ROI cost #3553
Workflow file for this run
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: main_workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lock_check: | |
| continue-on-error: False | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macos-15, windows-2025] | |
| python-version: ["3.10"] | |
| defaults: | |
| run: | |
| shell: bash | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Check if dependencies can be locked | |
| run: uv lock --check | |
| - name: Install dependencies | |
| run: uv sync --all-groups -v | |
| copyright_and_dependencies_check: | |
| continue-on-error: False | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04] | |
| python-version: ["3.10"] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| - name: Check copyright headers | |
| run: tomte check-copyright --author valory | |
| - name: License compatibility check | |
| run: tomte tox -e liccheck | |
| - name: Check dependencies | |
| run: tomte tox -e check-dependencies | |
| - name: Check third-party package hashes against upstreams | |
| run: tomte tox -e check-third-party-hashes | |
| - name: Check doc links | |
| run: | | |
| tomte check-doc-links \ | |
| --url-skips "https://li.quest/v1/quote" \ | |
| --url-skips "https://li.quest/v1/quote/toAmount" \ | |
| --url-skips "https://gateway.autonolas.tech/ipfs/" \ | |
| --url-skips "https://rpc.gnosischain.com/" \ | |
| --url-skips "https://1rpc.io/matic" \ | |
| --url-skips "https://omen.subgraph.autonolas.tech" | |
| - name: Check doc IPFS hashes | |
| run: tomte tox -e check-doc-hashes | |
| linter_checks: | |
| continue-on-error: False | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04] | |
| python-version: ["3.10"] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| pip install marshmallow==3.26.2 | |
| - name: Security checks | |
| run: tomte tox -p -e safety -e bandit | |
| - name: Check packages | |
| run: tomte tox -e check-packages | |
| - name: Check hash | |
| run: tomte tox -e check-hash | |
| - name: Code checks | |
| run: tomte tox -p -e black-check -e isort-check -e flake8 -e mypy -e pylint -e darglint | |
| - name: AbciApp consistency checks | |
| run: | | |
| tomte tox -e check-abci-docstrings | |
| tomte tox -e check-abciapp-specs | |
| tomte tox -e check-handlers | |
| # tomte tox -e analyse-service # analyse-service checks do not work properly as it is checking funds manager skill which is not an ABCI skill | |
| scan: | |
| name: gitleaks | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - run: | | |
| wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz | |
| tar -xzf gitleaks_8.10.1_linux_x64.tar.gz | |
| sudo install gitleaks /usr/bin | |
| pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| tomte tox -e gitleaks | |
| test: | |
| continue-on-error: False | |
| needs: | |
| - lock_check | |
| - copyright_and_dependencies_check | |
| - linter_checks | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macos-15, windows-2025] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.20.x" | |
| - name: Create decision maker's `store_path` (data folder) | |
| run: mkdir data | |
| - if: matrix.os == 'ubuntu-24.04' | |
| name: Install dependencies (ubuntu-24.04) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| pip install --user --upgrade setuptools | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip | |
| unzip protoc-24.3-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| # install Tendermint | |
| wget -O tendermint.tar.gz https://github.com/tendermint/tendermint/releases/download/v0.34.19/tendermint_0.34.19_linux_amd64.tar.gz | |
| tar -xf tendermint.tar.gz | |
| sudo mv tendermint /usr/local/bin/tendermint | |
| - if: matrix.os == 'ubuntu-24.04' | |
| name: Packages unit tests ubuntu-24.04 | |
| run: | | |
| tomte tox -e py${{ matrix.python-version }}-linux | |
| - if: matrix.os == 'macos-15' | |
| name: Install dependencies (macos-15) | |
| run: | | |
| pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| brew install gcc | |
| # brew install protobuf | |
| # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip | |
| unzip protoc-24.3-osx-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| brew tap yoheimuta/protolint | |
| brew install protolint | |
| - if: matrix.os == 'macos-15' | |
| name: Packages unit tests macos-15 | |
| run: | | |
| tomte tox -e py${{ matrix.python-version }}-darwin | |
| - if: matrix.os == 'windows-2025' | |
| name: Install dependencies (windows-2025) | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| run: | | |
| python -m pip install -U pip | |
| echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" | |
| choco install wget -y | |
| choco install protoc --version 24.3 | |
| choco install mingw -y | |
| choco install make -y | |
| # to check make was installed | |
| make --version | |
| pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| - if: matrix.os == 'windows-2025' | |
| name: Packages unit tests windows-2025 | |
| run: | | |
| tomte tox -e py${{ matrix.python-version }}-win | |
| coverage: | |
| continue-on-error: False | |
| needs: | |
| - test | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv | |
| pip install --user --upgrade setuptools | |
| - name: Check coverage | |
| run: tomte tox -e coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| fail_ci_if_error: false | |
| all_checks_passed: | |
| name: All checks passed | |
| if: always() | |
| needs: | |
| - lock_check | |
| - copyright_and_dependencies_check | |
| - linter_checks | |
| - scan | |
| - test | |
| - coverage | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Fail if any required job failed or was cancelled | |
| if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: exit 1 |