Skip to content

ci(snyk): tag CLI scans with public repo URL so they use the open-source quota #301

ci(snyk): tag CLI scans with public repo URL so they use the open-source quota

ci(snyk): tag CLI scans with public repo URL so they use the open-source quota #301

Workflow file for this run

name: main_workflow
on:
push:
branches:
- develop
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
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 match upstream
run: tomte tox -e check-third-party-hashes
- name: Check doc links
run: |
tomte check-doc-links \
--url-skips https://soft-sly-slug.base-mainnet.quiknode.pro/f13d998d9d68685faeee903499e15b4b386a8b1c/ \
--url-skips https://developer.x.com/en/portal/dashboard \
--url-skips https://tenderly.co/ \
--url-skips https://foundry.paradigm.xyz \
--url-skips https://github.com/olas-operate-app \
--url-skips "https://gateway.autonolas.tech/ipfs/{ipfs_hash}" \
--url-skips https://agentsfun-indexer-production.up.railway.app \
--url-skips https://api.fireworks.ai/inference/v1/chat/completions \
--url-skips https://li.quest/v1/quote/toAmount \
--url-skips https://1rpc.io/base \
--url-skips https://afmdb.autonolas.tech \
--url-skips https://api.subgraph.autonolas.tech/api/proxy/autonolas-base \
--url-skips https://api.subgraph.autonolas.tech/api/proxy/marketplace-base
- 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
- 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
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/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz
tar -xzf gitleaks_8.21.2_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: 120
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- 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
- 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
pip install --user --upgrade setuptools
- 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)
run: |
python -m pip install -U pip
pip install 'tomte[tox,cli] @ git+https://github.com/valory-xyz/tomte.git@v0.7.0' tox-uv
pip install --user --upgrade setuptools
- if: matrix.os == 'windows-2025'
name: Packages unit tests windows-2025
run: |
tomte tox -e py${{ matrix.python-version }}-win
- if: matrix.os == 'ubuntu-24.04' && matrix.python-version == '3.14'
name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
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
runs-on: ubuntu-24.04
steps:
- name: Fail if any required job failed, was cancelled, or skipped
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
run: exit 1
- run: echo "All required checks passed."