Deployment and Testing with Foundry
Learn how to deploy and test your Foundry project's contracts with BuildBear's CI/CD service.
Install the BuildBear Foundry Fork
Using Foundry with BuildBear's CI/CD service requires installing our fork of Foundry, which includes essential updates for:
- Generating enhanced artifacts for test simulation
- Enabling automatic contract verification
- Improved integration with BuildBear's infrastructure
Install our Foundry fork instead of the standard version:
Cheatcode Support: BuildBear currently supports 45 Foundry cheat codes. You can see the entire list here.
Setup GitHub Actions
BuildBear's CI/CD system uses GitHub Actions. We encourage you to check out the official GitHub Actions documentation for more information. For the purposes of this quickstart, you'll only need to create a .github/workflows directory at the top-level of your repository. Workflows are YAML files that we'll put in this folder.
Workflow File
To get started with Foundry you can use this workflow:
A few things to notice about this portion of the workflow:
- At the time of writing, v1.0.0 is the current version of the action, please check the BB CI Action GitHub repo for the latest version.
network
is a list that can take multiple chain objects and their specified IDs, as well as an optionalblockNumber
.- For the deploy-command you can use either a script or a Foundry command directly.