From f91942e401415ab5643b8c24bde043902eb3302e Mon Sep 17 00:00:00 2001 From: Lucas Bustamante Date: Fri, 12 Apr 2024 08:12:25 -0300 Subject: [PATCH] Space out sharded tests to avoid Docker 429'ing us --- .github/workflows/qit-environment-dangling-test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/qit-environment-dangling-test.yml b/.github/workflows/qit-environment-dangling-test.yml index 7b41892c..f6acb890 100644 --- a/.github/workflows/qit-environment-dangling-test.yml +++ b/.github/workflows/qit-environment-dangling-test.yml @@ -26,6 +26,11 @@ jobs: - name: Enable dev mode run: ./qit dev + # Delay start of tests based on shardIndex to space out requests and avoid 429. + # Example: This step causes shard 1 to start immediately, shard 2 to start after a 10-second delay, shard 3 after a 20-second delay, etc. + - name: Wait before running tests + run: sleep $(( (${{ matrix.shardIndex }} - 1) * 10 )) + - name: Connect to Staging QIT run: ./qit backend:add --environment="staging" --qit_secret="${{ secrets.QIT_STAGING_SECRET }}" --manager_url="https://stagingcompatibilitydashboard.wpcomstaging.com"