-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Run all unit tests in a single Buildkite job #22259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr22259-454737c | |
Commit | 454737c | |
Direct Download | wordpress-prototype-build-pr22259-454737c.apk |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr22259-454737c | |
Commit | 454737c | |
Direct Download | jetpack-prototype-build-pr22259-454737c.apk |
As Codecov have difficulties finding these reports on its own
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #22259 +/- ##
==========================================
- Coverage 39.91% 39.89% -0.03%
==========================================
Files 2165 2165
Lines 102511 102560 +49
Branches 14771 14791 +20
==========================================
- Hits 40922 40920 -2
- Misses 58122 58171 +49
- Partials 3467 3469 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR consolidates five separate Buildkite unit test jobs into a single job to improve resource efficiency and simplify CI pipeline management. The change reduces build overhead by running all unit tests in one job instead of building modules separately for each test suite.
Key changes:
- Merged WordPress, processors, image-editor, fluxc, and login unit test jobs into one
- Updated test collection and reporting to handle multiple modules in a single job
- Modified code coverage upload to handle multiple coverage reports simultaneously
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
.buildkite/pipeline.yml | Consolidated 5 separate unit test jobs into single job configuration |
.buildkite/commands/run-unit-tests.sh | Refactored script to run all unit tests together and collect results from multiple modules |
.buildkite/commands/upload-code-coverage.sh | Enhanced to upload multiple coverage files in one execution |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
FYI @wzieba that we might want to add post-merge instructions to not forget to remove these 3 pending and soon-to-be outdated checks... ![]() ...from within branch protections rules of this repo: ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done @wzieba , much better and we gain so much out of this change, awesome! ❤️ 🚀
What motivated me to propose this change:
💯 🎯 🥇
Test reports: On this PR checks, verify that you can see 6373 tests in Test Engine (button in top-right corner of logs)
✅

Code coverage reports: See that code coverage wasn't changed meaningfully by this PR (a slight change comes from the fact it's outdated branch). To double check, see in Buildkite logs that 5 reports have been uploaded to Codecov
✅

Failed tests report: Open PR #22263. Verify, that tests have been reported to Test Engine, even though one of them failed.
✅


results_file="$test_results_dir/merged-test-results.xml" | ||
if [[ "$TESTS_EXIT_STATUS" -eq 0 ]]; then | ||
echo "--- ⚒️ Uploading code coverage" | ||
# Find all kover XML reports and upload them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
temp_test_results_dir=$(mktemp -d) | ||
|
||
# Define test result directories for each module | ||
declare -A TEST_RESULT_DIRS=( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise (❤️): Love this approach, much thing so much simpler, although, as per my previous comment, it is now harder to make this too dynamic... 💭
done | ||
|
||
# Upload all coverage reports in a single execution | ||
./codecov -t "$CODECOV_TOKEN" "${coverage_args[@]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise (❤️): Nice and TIL! 🥇
|
Closes: AINFRA-1369: Merge unit tests into a single Buildkite job in WordPress/Jetpack Android
Description
This PR merges 5 separate unit tests Buildkite jobs into one.
Motivation
What motivated me to propose this change:
WordPress
module, which builds all submodules but runs onlyWordPress
unit tests.Testing instructions