Skip to content

Manage Anvil via pytest plugin - #33

Merged
YoshihitoAso merged 1 commit into
mainfrom
refactor-anvil-plugin
Jun 8, 2026
Merged

Manage Anvil via pytest plugin#33
YoshihitoAso merged 1 commit into
mainfrom
refactor-anvil-plugin

Conversation

@YoshihitoAso

@YoshihitoAso YoshihitoAso commented Jun 8, 2026

Copy link
Copy Markdown
Member

📌 Description

This pull request modernizes and simplifies the project's testing workflow by migrating Anvil process management from shell scripts to Python.

✅ Related Issues

None

🔄 Changes

Testing Workflow Modernization and Anvil Management:

  • Replaced the Bash-based Anvil management script (tests/run_anvil_test.sh) with a new Python-based approach using tests/anvil_manager.py and tests/local_anvil_config.py. This enables more robust, cross-platform Anvil lifecycle management directly integrated with pytest via hooks, and removes the need for environment variable juggling in the Makefile and workflow files.
  • Updated the GitHub Actions workflow (.github/workflows/pr.yml) and Makefile to use uv run ape test --network ethereum:local:foundry directly, eliminating the custom shell script and simplifying test invocation.

Configuration and Environment Updates:

  • Updated ape-config.yaml to:
    • Change the project name.
    • Switch the EVM version from berlin to osaka and enable Solidity's IR-based compilation (via_ir: true).
    • Adjust Foundry/Anvil settings (timeouts, process attempts) for faster and more reliable test runs.
  • Refactored config.py to simplify environment variable parsing for configuration values, making the code cleaner and easier to maintain.

📌 Checklist

  • I have added tests where necessary.
  • I have updated the documentation where necessary.

@YoshihitoAso
YoshihitoAso merged commit 80c1fd7 into main Jun 8, 2026
4 of 5 checks passed
@YoshihitoAso
YoshihitoAso deleted the refactor-anvil-plugin branch June 8, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant