forked from taikoxyz/simple-taiko-node
-
Notifications
You must be signed in to change notification settings - Fork 2
chore(devnet): devnet test script #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
nme-mvasylenko
wants to merge
25
commits into
main
from
chore/protocol-deployer-script-non-root-user-fix
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
09bf9df
make docker build work on linux with non-root user
nme-mvasylenko 368d9e0
non-root build docker issues; ci check script
nme-mvasylenko 24434e3
rename
nme-mvasylenko b65668d
check containers
nme-mvasylenko ff95414
feat(ci): add e2e check
nme-mvasylenko 6fc5cad
feat(ci): e2e check fix
nme-mvasylenko e20faee
linting issue
nme-mvasylenko 12b3946
remove cleanup
nme-mvasylenko 885d01c
no cleanup
nme-mvasylenko 2720c2d
skip removal on start
nme-mvasylenko 726497b
remove websocket health check
nme-mvasylenko b824122
rename CI action
nme-mvasylenko 82b9ddd
refactor
nme-mvasylenko 409a233
cleanup
nme-mvasylenko c9e571f
rename steps
nme-mvasylenko f22cd96
cleanup refactor
nme-mvasylenko 7dbb050
remove ws check
nme-mvasylenko d1563ab
add cleanup ci
nme-mvasylenko aa68513
pin action
nme-mvasylenko fd6b874
fix non-user uid
nme-mvasylenko a1381f2
fix
nme-mvasylenko 63bf1c7
cleanup
nme-mvasylenko 266b81d
Potential fix for code scanning alert no. 15: Workflow does not conta…
nme-mvasylenko 7ebc777
Update surge-remover.sh
nme-mvasylenko a2db3bf
Update surge-remover.sh
nme-mvasylenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| 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/ |
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
| 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'] | ||
| }) | ||
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
Empty file.
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
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
Empty file.
Empty file.
Empty file.
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
| 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" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.