Skip to content

Python Specification #3368

Python Specification

Python Specification #3368

Workflow file for this run

name: Python Specification
on:
push:
branches:
- master
- mainnet
- "forks/**"
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- name: Install Tox and any other packages
shell: bash
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes build-essential pkg-config
pip install 'tox>=4.11,<5' requests
- name: Run static checks
run: tox -e static
py3:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- uses: ./.github/actions/setup-env
- name: Run py3 tests
run: tox -e py3
pypy3:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "pypy3.11"
- uses: ./.github/actions/setup-env
- name: Run pypy3 tests
run: tox -e pypy3
env:
PYPY_GC_MAX: "2G"
PYPY_GC_MIN: "1G"
benchmark:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- uses: ./.github/actions/setup-env
- uses: ./.github/actions/build-evmone
- name: Fill benchmark tests
run: tox -e benchmark
json_infra:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- uses: ./.github/actions/setup-env
- name: Cache fixture database
id: cache-fixtures-db
uses: actions/cache@v4
with:
path: tests/json_infra/fixtures.db
key: fixtures-db-${{ hashFiles('tests/json_infra/fixtures/**/*.json') }}
- name: Build fixture database if cache miss
if: steps.cache-fixtures-db.outputs.cache-hit != 'true'
run: uv run python tests/json_infra/build_fixture_db.py
- name: Run json infra tests
run: tox -e json_infra
env:
EELS_USE_FIXTURE_DB: 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
with:
files: .tox/coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
optimized:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- uses: ./.github/actions/setup-env
- name: Run optimized tests
run: tox -e optimized
tests_pytest_py3:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
- uses: ./.github/actions/setup-env
- uses: ./.github/actions/build-evmone
- name: Run py3 tests
run: tox -e tests_pytest_py3
tests_pytest_pypy3:
runs-on: [self-hosted-ghr, size-xl-x64]
needs: static
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "pypy3.11"
- uses: ./.github/actions/setup-env
- uses: ./.github/actions/build-evmone
- name: Run pypy3 tests
run: tox -e tests_pytest_pypy3
env:
PYPY_GC_MAX: "2G"
PYPY_GC_MIN: "1G"