ethereum / ethereum/execution-specs
Add geth evm build to CI for `tests_pytest_py*3` tox envs
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 505
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 116
Description
### Problem
The `packages/testing` unit test [`src/execution_testing/client_clis/tests/test_transition_tools_support.py::test_ci_multi_t8n_support`](https://github.com/ethereum/execution-specs/blob/21407ec427951844f33d1584d10fb123731f6b36/packages/testing/src/execution_testing/client_clis/tests/test_transition_tools_support.py#L51) checks that `GethTransitionTool` is available in CI. This requires the `evm` command (from `go-ethereum/cmd/evm`).
The `tests_pytest_py3` and `tests_pytest_pypy3` CI jobs do build `geth`, but the test passes regardless. This is because under tox, the `CI` environment variable was not in `passenv` for `tests_pytest_py3`. The `running_in_ci` fixture returned `False`, so the test never actually asserted that geth or evmone were available. The test was passing trivially.
### Fix
Use `build-evm-client/geth` in both `tests_pytest_py3` and `tests_pytest_pypy3` jobs in `.github/workflows/test.yaml`. This builds the `evm` command from source and adds it to PATH. We should additionally cache the binary built as does `.github/actions/build-evmone/action.yaml`.
Imo, it's worth getting this in at some point because I've had fails locally due to geth being present locally, but these fails were not picked up in CI, cf https://github.com/ethereum/execution-specs/pull/2014#issuecomment-3749052858 (in which I also initially made a lazy attempt to download a more recent geth via `./scripts/download_geth_linux.py`, but that didn't work out).
Contributor guide
Assessment
This issue has not been assessed yet.