Add validate command for recipe pre-flight checks #747
Workflow file for this run
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: Checks | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: [main] | |
| jobs: | |
| e2e-test: | |
| name: E2E test (${{ matrix.flags }}) | |
| runs-on: warp-ubuntu-latest-x64-8x | |
| strategy: | |
| matrix: | |
| flags: | |
| - "l1" | |
| - "l1 --use-native-reth" | |
| - "l1 --with-prometheus" | |
| - "opstack" | |
| - "opstack --external-builder http://host.docker.internal:4444" | |
| - "opstack --enable-latest-fork=0" | |
| - "opstack --enable-latest-fork=10" | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: Install docker compose | |
| run: ./scripts/ci-setup-docker-compose.sh | |
| - name: Build playground utils | |
| run: ./scripts/ci-build-playground-utils.sh | |
| - name: Run playground | |
| run: go run main.go start ${{ matrix.flags }} --output /tmp/playground --timeout 10s --watchdog | |
| - name: Copy playground logs | |
| if: ${{ failure() }} | |
| run: ./scripts/ci-copy-playground-logs.sh /tmp/playground /tmp/playground-logs | |
| - name: Archive playground logs | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: playground-logs-${{ matrix.flags }} | |
| path: /tmp/playground-logs | |
| retention-days: 5 | |
| unit-test: | |
| name: Unit test | |
| runs-on: warp-ubuntu-latest-x64-8x | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: Install docker compose | |
| run: ./scripts/ci-setup-docker-compose.sh | |
| - name: Run unit tests | |
| run: go test -v ./playground/... | |
| integration-test: | |
| name: Integration test | |
| runs-on: warp-ubuntu-latest-x64-8x | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: Install docker compose | |
| run: ./scripts/ci-setup-docker-compose.sh | |
| - name: Build playground utils | |
| run: ./scripts/ci-build-playground-utils.sh | |
| - name: Run unit tests | |
| run: make integration-test | |
| lint: | |
| name: Lint | |
| runs-on: warp-ubuntu-latest-x64-8x | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Install gofumpt | |
| run: go install mvdan.cc/gofumpt@v0.6.0 | |
| - name: Install staticcheck | |
| run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1 | |
| - name: Install golangci-lint | |
| run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2 | |
| - name: Lint | |
| run: make lint | |
| - name: Ensure go mod tidy runs without changes | |
| run: | | |
| go mod tidy | |
| git update-index -q --really-refresh | |
| git diff-index HEAD | |
| docs-check: | |
| name: Check documentation is up to date | |
| runs-on: warp-ubuntu-latest-x64-8x | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: Generate documentation | |
| run: make generate-docs | |
| - name: Check for uncommitted changes | |
| run: | | |
| git update-index -q --really-refresh | |
| git diff-index --quiet HEAD -- docs/recipes/ || (echo "Documentation is out of date. Please run 'go run main.go generate-docs' and commit the changes." && exit 1) |