Remove apt-install of xvfb and chromium in GHA - #16874
Merged
Merged
Conversation
stevejalim
approved these changes
Nov 19, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the GitHub Actions workflow by removing unnecessary system package installations and adding npm caching. The changes reduce CI runtime by leveraging pre-installed tools in the GitHub runner environment and improve build performance through dependency caching.
Key changes:
- Removed redundant apt-get installation of xvfb and chromium (already available in ubuntu-latest runner)
- Added npm caching to speed up dependency installation
- Added explicit read-only permissions to follow security best practices
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
If this changeset needs to go into the FXC codebase, please add the
WMO and FXClabel. 💯One-line summary
Removes a slow and convoluted install step for things already available in the runner.
Significant changes and points to review
Added caching as the FE/JS testing stack takes some time to install so it might be worth it. Accompanied by an explicitly readonly token to make sure this has no privileges.
I also took the liberty of renaming the workflow file, as the unit tests are not run only for PRs, so to match the content I bit the bullet and made it just plain "unit_tests" if there are no objections. (AFAICT there's no automation to pull the pipeline statuses or anything like that; but to double check in case there's anything in repo settings branch protections to require certain checks to pass before some merges…)
Issue / Bugzilla link
#16872
Testing
@janbrasna/bedrock/actions/runs/19473152578/ ✅