Skip to content

Run integration tests for each project in parallel - #158

Merged
rohangavankar merged 1 commit into
developfrom
parallel-integration-tests
Nov 24, 2026
Merged

rohangavankar merged 1 commit into
developfrom
parallel-integration-tests

Conversation

@rohangavankar

Copy link
Copy Markdown
Contributor

make test-integration ran each project's integration tests one after another and stopped at the first failing project. This runs each project as its own make target, 4 at a time, which cuts the step's wall time without changing which tests run.

  • INTEGRATION_JOBS (default 4) sets how many projects run at once.
  • -k keeps the remaining projects running after a failure, so one build reports every failing project. The step still exits non-zero if any project failed.
  • --output-sync=target prints each project's output as one block when GNU make 4 or later is available. The CI image has it.
  • Each project prints == <project> finished in Ns (exit N), and the step prints its total. pytest's --durations=5 lists each project's slowest tests.

Testing

Measured on a draft PR (#156) with the same change:

  • Same results. The same 21 projects ran with identical per-project pass/skip counts and warnings compared with a sequential build.
  • Faster. The integration step went from about 16 min to 9.2 min. CloudFormation (~9 min) was the slowest project. It is now skipped on develop, so expect the step to fall from about 7.5 min sequentially to about 2 min, with Secrets Manager the slowest project.
  • Failures stay readable. A run with deliberate failures in Lambda, Polly and DynamoDB (3 failures and 2 errors each, covering assertion, exception, setup and teardown errors) showed:
    • all 15 failures and errors with full tracebacks
    • each failing project's output as one uninterrupted block, ending in its own short test summary
    • the other projects still running to completion
    • the build failing at the end
    • make[1]: *** [...integration/clients/<project>] Error 1 lines listing each failing project

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Each project's integration tests run as their own make target, 4 at a time (INTEGRATION_JOBS). -k keeps the remaining projects running after a failure, and make still exits non-zero if any failed. --output-sync=target keeps each project's output in one block when GNU make 4 or later is available. Each project and the whole step print how long they took.
@rohangavankar
rohangavankar requested a review from a team as a code owner November 24, 2026 21:16
@rohangavankar
rohangavankar merged commit 1b56f76 into develop Nov 24, 2026
5 checks passed
@rohangavankar
rohangavankar deleted the parallel-integration-tests branch November 24, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants