Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Exclude database and execution data directories from Docker build context
blockscout-postgres-data/
execution-data/
blockscout-db-data/
mysql-data/
rabbitmq/

# Exclude git directory
.git/
.gitmodules

# Exclude deployment artifacts
deployment/

# Exclude environment files
.env
.env.*

# Exclude docker compose files (not needed in build context)
docker-compose*.yml

# Exclude any other data directories
*-data/
data/

# Exclude temporary files
tmp/
131 changes: 131 additions & 0 deletions .github/workflows/devnet-test-no-provers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Devnet Provision Check (No Provers)

on:
schedule:
# Run nightly at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
# Allow manual trigger
pull_request:
paths:
- 'docker-compose*.yml'
- 'surge-*.sh'
- 'script/devnet-provision-check.sh'
- 'script/devnet-provision-check-ci.sh'
- 'script/util/common.sh'
- '.github/workflows/devnet-test-no-provers.yml'

env:
SURGE_ETHEREUM_PACKAGE_REPO: 'NethermindEth/surge-ethereum-package'
SURGE_ETHEREUM_PACKAGE_REF: 'main'

jobs:
devnet-provision-check-no-provers:
name: Devnet Provision Check (No Provers)
permissions:
contents: read
issues: write
runs-on: ubuntu-22.04
timeout-minutes: 45

steps:
- name: Checkout simple-surge-node
uses: actions/checkout@v4
with:
path: simple-surge-node

- name: Checkout surge-ethereum-package
uses: actions/checkout@v4
with:
repository: ${{ env.SURGE_ETHEREUM_PACKAGE_REPO }}
ref: ${{ env.SURGE_ETHEREUM_PACKAGE_REF }}
path: surge-ethereum-package

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl jq

- name: Install Kurtosis CLI
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt-get update
sudo apt-get install -y kurtosis-cli
kurtosis version

- name: Verify Docker installation
run: |
docker --version
docker compose version
docker info

- name: Run Devnet Provision Check (No Provers)
working-directory: simple-surge-node
env:
L1_PACKAGE_DIR: ../surge-ethereum-package
L1_ENVIRONMENT: local
L1_MODE: silence
L1_RPC_URL: http://localhost:32003
L1_STABILIZE_WAIT: 20
ENABLE_PROVER: false
run: |
./script/devnet-provision-check-ci.sh

- name: Collect Docker logs on failure
if: failure()
working-directory: simple-surge-node
run: |
echo "Docker Compose Services Status"
docker compose ps || true

echo "Docker Compose Logs (last 100 lines)"
docker compose logs --tail=100 || true

echo "Kurtosis Enclaves"
kurtosis enclave ls || true

echo "Kurtosis Services (surge-devnet)"
kurtosis enclave inspect surge-devnet || true

- name: Cleanup - Stop L2 services
if: always()
working-directory: simple-surge-node
run: |
./surge-remover.sh --devnet-non-interactive || true

- name: Cleanup - Stop L1 devnet
if: always()
run: |
cd surge-ethereum-package && ./remove-surge-devnet-l1.sh --force || true

- name: Cleanup - Docker system prune
if: always()
run: |
docker system prune -af --volumes || true

- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: devnet-provision-check-no-provers-logs
path: |
simple-surge-node/deployment/*.json
simple-surge-node/*.log
retention-days: 7
if-no-files-found: ignore

- name: Notify on failure
if: failure() && github.event_name == 'schedule'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Nightly Devnet Provision Check (No Provers) Failed',
body: 'The nightly devnet provision check (no provers) failed on ' + new Date().toISOString() + '\n\nWorkflow run: ' + context.serverUrl +'/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + context.runId,
labels: ['bug', 'devnet', 'provision-check', 'automated']
})
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

.idea/

/mysql-data/
/rabbitmq/
/execution-data/
/mysql-data/*
!/mysql-data/.gitkeep
/rabbitmq/*
!/rabbitmq/.gitkeep
/execution-data/*
!/execution-data/.gitkeep
/deployment/*.json
/deployment/*.lock
/configs/*.json
/blockscout-postgres-data/
/blockscout-postgres-data/*
!/blockscout-postgres-data/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions docker-compose-relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
relayer-db:
image: mysql:8.0
container_name: relayer-db
# Only set user if DOCKER_USER is explicitly provided (local dev), not in CI
user: "${DOCKER_USER:-}"
cap_add:
- SYS_NICE
restart: always
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ services:
blockscout-postgres:
image: postgres:alpine
container_name: l2-blockscout-postgres
# Only set user if DOCKER_USER is explicitly provided (local dev), not in CI
user: "${DOCKER_USER:-}"
restart: unless-stopped
pull_policy: always
volumes:
Expand Down
Empty file added execution-data/.gitkeep
Empty file.
Empty file added mysql-data/.gitkeep
Empty file.
Empty file added rabbitmq/.gitkeep
Empty file.
46 changes: 46 additions & 0 deletions script/devnet-provision-check-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"

# Source common utilities
source "$SCRIPT_DIR/util/common.sh"

# Configuration with defaults
L1_PACKAGE_DIR="${L1_PACKAGE_DIR:-$PROJECT_ROOT/../surge-ethereum-package}"
L1_ENVIRONMENT="${L1_ENVIRONMENT:-local}"
L1_MODE="${L1_MODE:-silence}"
L1_RPC_URL="${L1_RPC_URL:-http://localhost:32003}"
L1_STABILIZE_WAIT="${L1_STABILIZE_WAIT:-20}"
ENABLE_PROVER="${ENABLE_PROVER:-false}"
ENV_FILE="${ENV_FILE:-$PROJECT_ROOT/.env.devnet}"

echo "Starting CI Devnet Provision Check (No Provers)"
echo

# Step 1: Deploy L1 Devnet
echo "Step 1: Deploy L1 Devnet"
deploy_l1 "$L1_PACKAGE_DIR" "$L1_ENVIRONMENT" "$L1_MODE"
echo

# Step 2: Verify L1 is ready
echo "Step 2: Verify L1 is ready"
print_info "Waiting ${L1_STABILIZE_WAIT} seconds for L1 to stabilize..."
sleep "$L1_STABILIZE_WAIT"

wait_for_rpc "$L1_RPC_URL"
echo

# Step 3: Configure environment for no-prover testing
if [ "$ENABLE_PROVER" = "false" ]; then
echo "Step 3: Configure environment for no-prover testing"
configure_env_no_provers "$ENV_FILE"
echo
fi

# Step 4: Run L2 Devnet Provision Check
echo "Step 4: Run L2 Devnet Provision Check"
cd "$PROJECT_ROOT"
"$SCRIPT_DIR/devnet-provision-check.sh"
Loading