Skip to content

Make revert sequntial #2

Make revert sequntial

Make revert sequntial #2

name: Workflow template for CI jobs for Core Components
on:
workflow_call:
env:
CLICOLOR: 1
jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml
tests:
runs-on: [ matterlabs-ci-runner ]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
submodules: "recursive"
fetch-depth: 0
- name: Setup environment
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
- name: Start services
run: |
ci_localnet_up
ci_run sccache --start-server
- name: Build zk_toolbox
run: ci_run bash -c "./bin/zkt"
- name: Initialize ecosystem
run: |
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk_inception ecosystem init --deploy-paymaster --deploy-erc20 \
--deploy-ecosystem --l1-rpc-url=http://localhost:8545 \
--server-db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--server-db-name=zksync_server_localhost_era \
--prover-db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--prover-db-name=zksync_prover_localhost_era \
--ignore-prerequisites --verbose \
--observability=false
- name: Create and initialize Validium chain
run: |
ci_run zk_inception chain create \
--chain-name chain_validium \
--chain-id sequential \
--prover-mode no-proofs \
--wallet-creation localhost \
--l1-batch-commit-data-generator-mode validium \
--base-token-address 0x0000000000000000000000000000000000000001 \
--base-token-price-nominator 1 \
--base-token-price-denominator 1 \
--set-as-default false \
--ignore-prerequisites
ci_run zk_inception chain init \
--deploy-paymaster \
--l1-rpc-url=http://localhost:8545 \
--server-db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--server-db-name=zksync_server_localhost_validium \
--prover-db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--prover-db-name=zksync_prover_localhost_validium \
--port-offset 2000 \
--chain chain_validium
- name: Build test dependencies
run: |
ci_run zk_supervisor test build
- name: Run servers
run: |
ci_run zk_inception server --ignore-prerequisites --chain era &> server_rollup.log &
ci_run zk_inception server --ignore-prerequisites --chain chain_validium &> server_validium.log &
ci_run sleep 5
- name: Run integration tests
run: |
ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --chain era &> integration_rollup.log &
PID1=$!
ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --chain chain_validium &> integration_validium.log &
PID2=$!
wait $PID1
wait $PID2
- name: Init external nodes
run: |
ci_run zk_inception external-node configs --db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--db-name=zksync_en_localhost_era_rollup --l1-rpc-url=http://localhost:8545 --chain era
ci_run zk_inception external-node init --ignore-prerequisites --chain era
ci_run zk_inception external-node configs --db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--db-name=zksync_en_localhost_era_validium1 --l1-rpc-url=http://localhost:8545 --chain chain_validium
ci_run zk_inception external-node init --ignore-prerequisites --chain chain_validium
- name: Run recovery tests (from snapshot)
run: |
ci_run zk_supervisor test recovery --snapshot --no-deps --ignore-prerequisites --verbose --chain era &> recovery_snap_rollup.log &
PID1=$!
ci_run zk_supervisor test recovery --snapshot --no-deps --ignore-prerequisites --verbose --chain chain_validium &> recovery_snap_validium.log &
PID2=$!
wait $PID1
wait $PID2
- name: Run recovery tests (from genesis)
run: |
ci_run zk_supervisor test recovery --no-deps --ignore-prerequisites --verbose --chain era &> recovery_gen_rollup.log &
PID1=$!
ci_run zk_supervisor test recovery --no-deps --ignore-prerequisites --verbose --chain chain_validium &> recovery_gen_validium.log &
PID2=$!
wait $PID1
wait $PID2
- name: Run external node server
run: |
ci_run zk_inception external-node run --ignore-prerequisites --chain era &> external_node_rollup.log &
ci_run zk_inception external-node run --ignore-prerequisites --chain chain_validium &> external_node_validium.log &
ci_run sleep 5
- name: Run integration tests en
run: |
ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --external-node --chain era &> integration_en_rollup.log &
PID1=$!
ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --external-node --chain chain_validium &> integration_en_validium.log &
PID2=$!
wait $PID1
wait $PID2

Check failure on line 144 in .github/workflows/ci-zk-toolbox-reusable.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-zk-toolbox-reusable.yml

Invalid workflow file

You have an error in your yaml syntax on line 144
- name: Run revert tests (external node)
run: |
ci_run zk_supervisor test revert --no-deps --external-node --ignore-prerequisites --chain chain_validium &> revert_validium.log
# PID2=$!
ci_run zk_supervisor test revert --no-deps --ignore-prerequisites --chain era &> revert_rollup.log
# PID1=$!
# wait $PID1
# wait $PID2
# Upgrade tests should run last, because as soon as they
# finish the bootloader will be different
# TODO make upgrade tests safe to run multiple times
- name: Run upgrade test
run: |
ci_run zk_supervisor test upgrade --no-deps --chain era
- name: Show server_rollup.log logs
if: always()
run: ci_run cat server_rollup.log || true
- name: Show server_validium.log logs
if: always()
run: ci_run cat server_validium.log || true
- name: Show external_node_rollup.log logs
if: always()
run: ci_run cat external_node_rollup.log || true
- name: Show external_node_validium.log logs
if: always()
run: ci_run cat external_node_validium.log || true
- name: Show integration_rollup.log logs
if: always()
run: ci_run cat integration_rollup.log || true
- name: Show integration_validium.log logs
if: always()
run: ci_run cat integration_validium.log || true
- name: Show recovery_snap_rollup.log logs
if: always()
run: ci_run cat recovery_snap_rollup.log || true
- name: Show recovery_snap_validium.log logs
if: always()
run: ci_run cat recovery_snap_validium.log || true
- name: Show recovery_gen_rollup.log logs
if: always()
run: ci_run cat recovery_gen_rollup.log || true
- name: Show recovery_gen_validium.log logs
if: always()
run: ci_run cat recovery_gen_validium.log || true
- name: Show integration_en_rollup.log logs
if: always()
run: ci_run cat integration_en_rollup.log || true
- name: Show integration_en_validium.log logs
if: always()
run: ci_run cat integration_en_validium.log || true
- name: Show revert_rollup.log logs
if: always()
run: ci_run cat revert_rollup.log || true
- name: Show revert_validium.log logs
if: always()
run: ci_run cat revert_validium.log || true
- name: Show revert_main.log logs
if: always()
run: |
ci_run cat core/tests/revert-test/era_revert_main.log || true
ci_run cat core/tests/revert-test/chain_validium_revert_main.log || true
- name: Show revert_ext.log logs
if: always()
run: |
ci_run cat core/tests/revert-test/era_revert_ext.log || true
ci_run cat core/tests/revert-test/chain_validium_revert_ext.log || true