feat: sourcing github action credentials for release (#290) #1342
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: Devnet Smoke Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [ '**' ] | |
| permissions: | |
| contents: read | |
| env: | |
| FOUNDRY_PROFILE: ci | |
| L1_FORK_URL: ${{ secrets.L1_FORK_URL }} | |
| L2_FORK_URL: ${{ secrets.L2_FORK_URL }} | |
| jobs: | |
| devnet-test: | |
| strategy: | |
| fail-fast: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: '1.24' | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0 | |
| with: | |
| version: stable | |
| - name: Install devkit CLI | |
| run: make install | |
| - name: Add ~/bin to PATH | |
| run: echo "$HOME/bin" >> $GITHUB_PATH | |
| - name: Create AVS project | |
| run: devkit avs create my-avs | |
| - name: Start devnet | |
| run: | | |
| cd ./my-avs/ | |
| devkit avs devnet start & | |
| sleep 10 # wait for devnet to fully start | |
| - name: Check block number with cast (with retry) | |
| run: | | |
| for i in {1..10}; do | |
| bn=$(cast block-number --rpc-url http://localhost:8545 || echo "error") | |
| if [ "$bn" != "error" ]; then | |
| echo "Current block number: $bn" | |
| exit 0 | |
| fi | |
| echo "Anvil not ready yet, retrying in 2s..." | |
| sleep 2 | |
| done | |
| echo "Devnet didn't start properly after waiting" | |
| exit 1 | |
| - name: Stop devnet | |
| run: | | |
| cd ./my-avs/ | |
| devkit avs devnet stop |