feat(test-fill): speed up filling (#2079) #330
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: Hive Consume | |
| on: | |
| push: | |
| branches: | |
| - "forks/**" | |
| paths-ignore: | |
| - "**.md" | |
| - "LICENSE*" | |
| - ".gitignore" | |
| - ".vscode/**" | |
| - "whitelist.txt" | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/hive-consume.yaml" | |
| - ".github/actions/start-hive-dev/**" | |
| - ".github/actions/cache-docker-images/**" | |
| - ".github/actions/load-docker-images/**" | |
| - ".github/configs/hive/**" | |
| - "packages/testing/src/execution_testing/cli/pytest_commands/consume.py" | |
| - "packages/testing/src/execution_testing/cli/pytest_commands/pytest_ini_files/pytest-consume.ini" | |
| - "packages/testing/src/execution_testing/cli/pytest_commands/plugins/consume/**" | |
| - "packages/testing/src/execution_testing/cli/pytest_commands/plugins/pytest_hive/**" | |
| - "packages/testing/src/execution_testing/fixtures/consume.py" | |
| - "packages/testing/src/execution_testing/rpc/**" | |
| workflow_dispatch: | |
| inputs: | |
| docker_images: | |
| description: "Space-separated list of Docker images to cache" | |
| required: false | |
| default: "docker.io/ethereum/client-go:latest docker.io/alpine:latest docker.io/library/golang:1-alpine" | |
| workflow_call: | |
| inputs: | |
| docker_images: | |
| description: "Space-separated list of Docker images to cache" | |
| required: false | |
| type: string | |
| default: "docker.io/ethereum/client-go:latest docker.io/alpine:latest docker.io/library/golang:1-alpine" | |
| concurrency: | |
| group: hive-consume-${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| # Use direct URL instead of release spec (e.g., [email protected]) to avoid GitHub API rate limits | |
| FIXTURES_URL: https://github.com/ethereum/execution-spec-tests/releases/download/v5.3.0/fixtures_develop.tar.gz | |
| jobs: | |
| cache-docker-images: | |
| name: Cache Docker Images | |
| runs-on: [self-hosted-ghr, size-l-x64] | |
| steps: | |
| - name: Checkout execution-specs | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Cache Docker images | |
| uses: ./.github/actions/cache-docker-images | |
| with: | |
| images: ${{ inputs.docker_images || 'docker.io/ethereum/client-go:latest docker.io/alpine:latest docker.io/library/golang:1-alpine' }} | |
| test-hive: | |
| name: ${{ matrix.name }} | |
| needs: cache-docker-images | |
| runs-on: [self-hosted-ghr, size-l-x64] | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - name: Engine | |
| mode: simulator | |
| simulator: ethereum/eels/consume-engine | |
| - name: RLP | |
| mode: simulator | |
| simulator: ethereum/eels/consume-rlp | |
| - name: Sync | |
| mode: simulator | |
| simulator: ethereum/eels/consume-sync | |
| - name: Dev Mode | |
| mode: dev | |
| consume_command: engine | |
| steps: | |
| - name: Checkout execution-specs | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: execution-specs | |
| - name: Checkout Hive | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| repository: ethereum/hive | |
| ref: master | |
| path: hive | |
| - name: Setup go env and cache | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: ">=1.24" | |
| cache-dependency-path: hive/go.sum | |
| - name: Install uv and python | |
| if: matrix.mode == 'dev' | |
| uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "execution-specs/uv.lock" | |
| version: ${{ vars.UV_VERSION }} | |
| python-version: ${{ vars.DEFAULT_PYTHON_VERSION }} | |
| - name: Load cached Docker images | |
| uses: ./execution-specs/.github/actions/load-docker-images | |
| - name: Build hive | |
| run: | | |
| cd hive | |
| go build . | |
| - name: Run simulator tests | |
| if: matrix.mode == 'simulator' | |
| run: | | |
| cd hive | |
| ./hive --sim '${{ matrix.simulator }}' \ | |
| --sim.parallelism=1 \ | |
| --client go-ethereum \ | |
| --client-file ../execution-specs/.github/configs/hive/latest.yaml \ | |
| --sim.buildarg fixtures=${{ env.FIXTURES_URL }} \ | |
| --sim.limit=".*test_block_at_rlp_limit_with_logs.*Osaka.*" \ | |
| --docker.output | |
| - name: Start Hive in dev mode | |
| if: matrix.mode == 'dev' | |
| id: start-hive | |
| uses: ./execution-specs/.github/actions/start-hive-dev | |
| with: | |
| clients: go-ethereum | |
| client-file: execution-specs/.github/configs/hive/latest.yaml | |
| hive-path: hive | |
| timeout: "120" | |
| - name: Run consume in dev mode | |
| if: matrix.mode == 'dev' | |
| working-directory: execution-specs | |
| env: | |
| HIVE_SIMULATOR: ${{ steps.start-hive.outputs.hive-url }} | |
| run: | | |
| uv sync --all-extras | |
| uv run consume ${{ matrix.consume_command }} --input ${{ env.FIXTURES_URL }} -k "Osaka and test_block_at_rlp_limit_with_logs" | |