Add SummaryFormatter for integration test visibility in CI - #6817
Draft
rhcarvalho wants to merge 1 commit into
Draft
Add SummaryFormatter for integration test visibility in CI#6817rhcarvalho wants to merge 1 commit into
rhcarvalho wants to merge 1 commit into
Conversation
Currently, integration tests in CI run for ~10 minutes emitting only dots (`.`) with no visibility into test durations. Passing `--slowest` directly to `mix test` enables `--trace`, which forces `--max-cases 1` (serializing all async tests) and sets `timeout: :infinity`. This adds a lightweight `Phoenix.Integration.SummaryFormatter` that: 1. Runs tests at full async concurrency (`max_cases: 20`) with active timeout protection. 2. Automatically appends a structured Markdown summary table of all test durations (slowest to fastest) to `$GITHUB_STEP_SUMMARY` when running on GitHub Actions CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, integration tests in CI run for ~10 minutes emitting only dots (
.) with no visibility into test durations.Passing
--slowestdirectly tomix testenables--trace, which forces--max-cases 1(serializing all async tests) and setstimeout: :infinity.This adds a lightweight
Phoenix.Integration.SummaryFormatterthat:max_cases: 20) with active timeout protection.$GITHUB_STEP_SUMMARYwhen running on GitHub Actions CI.Example output runs/33211582776
Phoenix Integration Tests (Elixir 1.20.4 / OTP 29): Passed
Test Durations (Slowest to Fastest)
1m 34sAppWithScopesTesttest/code_generation/app_with_scopes_test.exs:1061m 22sAppWithScopesTesttest/code_generation/app_with_scopes_test.exs:401m 22sAppWithScopesTesttest/code_generation/app_with_scopes_test.exs:61m 15sAppWithScopesTesttest/code_generation/app_with_scopes_test.exs:711m 13sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:961m 06sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:1691m 01sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:351m 01sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:1351m 01sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:321m 00sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:3259sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:8658sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:16056sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:10055sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:15253sAppWithScopesTesttest/code_generation/app_with_scopes_test.exs:57152sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:4952sAppWithNoOptionsTesttest/code_generation/app_with_no_options_test.exs:2252sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:5151sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:14651sAppWithNoOptionsTesttest/code_generation/app_with_no_options_test.exs:451sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:5850sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:5850sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:650sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:1550sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:9650sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:650sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:649sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:6448sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:10948sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:12047sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:1546sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:14046sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:18045sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:8645sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:20844sAppWithSQLite3AdapterTesttest/code_generation/app_with_sqlite3_adapter_test.exs:9742sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:2641sAppWithMSSQLAdapterTesttest/code_generation/app_with_mssql_adapter_test.exs:11041sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:7640sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:2739sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:538sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:537sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:15637sAppWithMySqlAdapterTesttest/code_generation/app_with_mysql_adapter_test.exs:12837sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:21835sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:7334sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:17330sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:19626sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:20514sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:18413sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:12513sAppWithDefaultsTesttest/code_generation/app_with_defaults_test.exs:12010sUmbrellaAppWithDefaultsTesttest/code_generation/umbrella_app_with_defaults_test.exs:192