cobalt/test: Enable dedicated browser tests action for CI - Linux#9260
cobalt/test: Enable dedicated browser tests action for CI - Linux#9260Awallky wants to merge 4 commits intoyoutube:mainfrom
Conversation
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for running Linux browser tests in CI, refactoring run_browser_tests.py for robustness, and improving testing infrastructure. A significant security concern was identified due to the direct use of GitHub Actions expressions within shell scripts, which can lead to command injection vulnerabilities. Furthermore, the upload_test_artifacts action directly uses matrix context variables instead of action inputs, which is against best practices for reusable actions.
| failed_tests = [] | ||
| passed_count = 0 | ||
|
|
||
| for i, test in enumerate(tests): |
There was a problem hiding this comment.
We need to manually do the sharding. See https://source.corp.google.com/h/github/youtube/cobalt/+/main:cobalt/testing/browser_tests/cobalt_browsertests_runner.sh
And also need to switch back the build target to the python file. See #8717 (sorry did not get time to land it yet).
This change introduces a dedicated GitHub Actions workflow to run
browser tests on the Linux platform. A new action is added to
orchestrate the execution of the cobalt_browsertests_runner within
a virtual display environment (xvfb-run) on a host machine.
The existing run_browser_tests.py script is enhanced to execute
individual browser tests in isolated processes and to aggregate
their JUnit XML output into a single report, improving robustness
and debuggability in CI. Build configurations are updated to
include the browser test runner for Linux. Artifact archiving now
standardizes tar ownership for reproducibility.
These changes ensure comprehensive test coverage for the Linux
platform by integrating browser tests into the continuous
integration pipeline. Some tests are conditionally disabled on
Starboard where known issues exist, allowing them to run on Linux.
Test:
vpython3 cobalt/build/test_archive_test_artifacts.pyTest:
vpython3 cobalt/testing/browser_tests/tools/test_collect_test_artifacts.pyTest:
vpython3 cobalt/testing/browser_tests/test_run_browser_tests.pyBug: 483488213
Bug: 473909665