diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index f062585..3b4583c 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -78,16 +78,25 @@ jobs: test-templates: runs-on: ubuntu-latest + # A single platform test run can take up to ~33 minutes (the CLI's own polling limit), + # and transient errors are retried, so give the job room without letting it hang forever. + timeout-minutes: 120 env: SF_API_CLIENT_ID: "${{ secrets.SF_API_CLIENT_ID }}" SF_API_SECRET: "${{ secrets.SF_API_SECRET }}" SF_TEST_FIRM_ID: "${{ vars.SF_TEST_FIRM_ID }}" CHANGED_TEMPLATES: "${{ needs.check-changed-templates.outputs.changed_templates }}" - # Maximum number of liquid tests run in parallel against the live platform per batch. - # A single `run-test --status` call fires all of its handles concurrently (Promise.all) - # with no client-side rate limiting, so we cap the batch size and run batches - # sequentially to keep the global number of in-flight tests bounded. + # Concurrency and retry knobs. One `run-test --status` call runs all of its templates + # concurrently (Promise.all) with no client-side rate limiting, so the global number of + # in-flight tests is bounded by MAX_PARALLEL_TESTS (per call) x MAX_PARALLEL_FIRMS + # (buckets running at the same time). MAX_PARALLEL_TESTS: 10 + # How many firm|type buckets run at the same time. Different firms no longer wait for + # each other; a slow firm only delays its own bucket. + MAX_PARALLEL_FIRMS: 3 + # Attempts per template for TRANSIENT platform errors (internal error, no response, + # run never completed). Genuine test failures are never retried. + MAX_TEST_ATTEMPTS: 3 if: ${{ needs.check-changed-templates.outputs.changed_templates != '[]' }} needs: [check-auth, check-changed-templates] steps: @@ -112,13 +121,16 @@ jobs: - name: Run liquid tests for updated templates (grouped per firm, run in parallel) run: | MAX_PARALLEL="${MAX_PARALLEL_TESTS:-10}" - # Testable templates grouped by "|