Starknet Foundry Github Action

If you wish to use Starknet Foundry in your Github Actions workflow, you can use the setup-snfoundry action. This action installs the necessary snforge and sncast binaries.

📝 Note At this moment, only Linux and MacOS are supported.

Example workflow

Make sure you pass the valid path to Scarb.lock to setup-scarb action. This way, all dependencies including snforge_scarb_plugin will be cached between runs.

name: My workflow on: push: pull_request: jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Starknet Foundry uses: foundry-rs/setup-snfoundry@v3 - name: Setup Scarb uses: software-mansion/setup-scarb@v1 with: scarb-lock: ./hello_starknet/Scarb.lock - name: Run tests run: cd hello_starknet && snforge test