Skip to content

Shard integration tests by database with on-demand container setup in CI - #6836

Draft
rhcarvalho wants to merge 3 commits into
phoenixframework:mainfrom
praialabs:integration-test-ci-database-sharding
Draft

Shard integration tests by database with on-demand container setup in CI#6836
rhcarvalho wants to merge 3 commits into
phoenixframework:mainfrom
praialabs:integration-test-ci-database-sharding

Conversation

@rhcarvalho

Copy link
Copy Markdown
Contributor

To compare with #6834 and #6835. Had this locally as I worked through CI improvements this week.

@rhcarvalho
rhcarvalho force-pushed the integration-test-ci-database-sharding branch from ee05dc8 to 21f218b Compare September 4, 2026 14:36
@rhcarvalho

Copy link
Copy Markdown
Contributor Author

This turns the 2 integration test jobs into 8.

@SteffenDE your intuition re: Postgres is right, that's the slowest of the shards at 3m23s.

@rhcarvalho

Copy link
Copy Markdown
Contributor Author

The summary also grows from 2 to 8, I don't love that :(

@rhcarvalho

Copy link
Copy Markdown
Contributor Author

The summary also grows from 2 to 8, I don't love that :(

I'll try something that uploads JSON results from each shard as a GitHub artifact (1 day retention, 500 MB limit on the Free plan, we only need a few KB), then aggregates them to produce a single summary.

…acket

Normally the first version we are interested in is the Elixir version,
so use `(Elixir <version> | OTP <version>)` pattern across mix test,
installer test, and integration test jobs.

For integration tests, format the database service as
`integration test [<db>] (...)`, labeling the 'none' shard as
`[sqlite3 + no-db]` for clarity.
- Update `Phoenix.Integration.SummaryFormatter` to emit JSON artifacts
  instead of each shard generating a new section to GITHUB_STEP_SUMMARY.
- Filter executed test modules in `SummaryFormatter` (reused from PR
  6835, credit to Steffen) so modules excluded by database tag do not
  show up as zero-duration rows or empty Gantt bars.
- A fast final step in `ci.yml` waits on all matrix shards to run a
  script to merge shard JSON summaries into a single, unified GitHub
  Actions summary.
@rhcarvalho
rhcarvalho force-pushed the integration-test-ci-database-sharding branch from bd06851 to 680177d Compare September 4, 2026 16:57
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.

1 participant