Deploy network botanix (#1438) #8439
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
| # - Run (Foundry) Unit Test Suite | |
| # - will make sure that all tests pass | |
| name: Run Unit Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| push: | |
| branches: | |
| - main # makes sure that it runs on main branch after a PR has been merged | |
| # Allows to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: read # required to fetch repository contents | |
| jobs: | |
| run-unit-tests: | |
| # will only run once the PR is in "Ready for Review" state | |
| if: ${{ github.event.pull_request.draft == false }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| submodules: recursive | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dev dependencies | |
| run: bun install | |
| - name: Install Foundry | |
| uses: foundry-rs/[email protected] | |
| - name: Install forge Dependencies | |
| run: forge install | |
| - name: Fetch RPC endpoints from MongoDB | |
| run: | | |
| # Run the fetch-rpcs.ts script to update .env with RPC endpoint variables | |
| # This will fetch prioritized RPCs from MongoDB, or fall back to public RPCs from networks.json if MongoDB is unavailable | |
| bun fetch-rpcs | |
| # Only inject RPC endpoint variables into the GitHub Actions environment | |
| while IFS= read -r line || [[ -n "$line" ]]; do | |
| if [[ "$line" =~ ^ETH_NODE_URI_ ]]; then | |
| echo "$line" >> "$GITHUB_ENV" | |
| fi | |
| done < ".env" | |
| env: | |
| MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
| - name: Run forge tests (with auto-repeat in case of error) | |
| uses: Wandalen/[email protected] | |
| with: | |
| command: forge test | |
| attempt_limit: 10 | |
| attempt_delay: 15000 |