From add00a2ad63d4ceed6c6eb5185bf6be65448a84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Grze=C5=9Bkiewicz?= Date: Thu, 23 Jan 2025 18:59:40 +0100 Subject: [PATCH] feat(integration tests): Flakiness tests on push to main (#3454) Adding repeated runs of integration tests for easier tracking of tests flakiness. A single such check takes ~1h and should cost ~2$, which imo is more than acceptable --- .github/workflows/ci-core-reusable.yml | 27 ++++++++++++++++++++++++++ etc/env/file_based/general.yaml | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index f44b1f54dc02..6be2a05e52e2 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -462,6 +462,15 @@ jobs: run: | ci_run ./bin/run_on_all_chains.sh "zkstack dev test integration --no-deps --ignore-prerequisites" ${{ env.CHAINS }} ${{ env.INTEGRATION_TESTS_LOGS_DIR }} + - name: Repeat integration tests on push to main to check for flakiness + if: ${{ (steps.condition.outputs.should_run == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main') }} + run: | + for i in {1..10}; do + echo "Iteration $i" + mkdir -p ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/$i + ci_run ./bin/run_on_all_chains.sh "zkstack dev test integration --no-deps --ignore-prerequisites" ${{ env.CHAINS }} ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/$i + done + - name: Init external nodes run: | GATEWAY_RPC_URL="${{ matrix.use_gateway_chain == 'WITH_GATEWAY' && '--gateway-rpc-url=http://localhost:3550' || '' }}" @@ -506,6 +515,15 @@ jobs: run: | ci_run ./bin/run_on_all_chains.sh "zkstack dev test integration --no-deps --ignore-prerequisites --external-node" ${{ env.CHAINS }} ${{ env.INTEGRATION_TESTS_LOGS_DIR }} + - name: Repeat integration tests en on push to main to check for flakiness + if: ${{ (steps.condition.outputs.should_run == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main') }} + run: | + for i in {1..10}; do + echo "Iteration $i" + mkdir -p ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/$i + ci_run ./bin/run_on_all_chains.sh "zkstack dev test integration --no-deps --ignore-prerequisites --external-node" ${{ env.CHAINS }} ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/$i + done + - name: Fee projection tests run: | ci_run killall -INT zksync_server || true @@ -519,6 +537,15 @@ jobs: # Always run the chain-specific fee tests ci_run ./bin/run_on_all_chains.sh "zkstack dev test fees --no-deps --no-kill" ${{ env.CHAINS }} ${{ env.FEES_LOGS_DIR }} + - name: Repeat fee projection tests on push to main to check for flakiness + if: ${{ (steps.condition.outputs.should_run == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main') }} + run: | + for i in {1..10}; do + echo "Iteration $i" + mkdir -p ${{ env.FEES_LOGS_DIR }}/$i + ci_run ./bin/run_on_all_chains.sh "zkstack dev test fees --no-deps --no-kill" ${{ env.CHAINS }} ${{ env.FEES_LOGS_DIR }}/$i + done + - name: Run revert tests run: | ci_run killall -INT zksync_server || true diff --git a/etc/env/file_based/general.yaml b/etc/env/file_based/general.yaml index ece5a1156c5f..76d96fd0e8c4 100644 --- a/etc/env/file_based/general.yaml +++ b/etc/env/file_based/general.yaml @@ -359,7 +359,7 @@ pruning: enabled: true chunk_size: 10 removal_delay_sec: 60 - data_retention_sec: 3600 + data_retention_sec: 604800 commitment_generator: max_parallelism: 10