Introduce a GitHub Actions workflow for running the font tests#17263
Merged
Snuffleupagus merged 4 commits intomozilla:masterfrom Nov 13, 2023
Merged
Introduce a GitHub Actions workflow for running the font tests#17263Snuffleupagus merged 4 commits intomozilla:masterfrom
Snuffleupagus merged 4 commits intomozilla:masterfrom
Conversation
a8a94d8 to
4f40654
Compare
timvandermeij
added a commit
to timvandermeij/botio-files-pdfjs
that referenced
this pull request
Nov 11, 2023
If mozilla/pdf.js#17263 is in place, we will no longer run the font tests on the bots, which means that the font tests command should be removed. Moreover, we can get rid of all submodule installations because the project won't have any submodules anymore after that patch, which simplifies the code and reduces runtime of all tests a bit (note that the submodules were also installed for tests that didn't need them).
The current logic is more complicated than it needs to be because it's passing a callback function to `startBrowsers` instead of a string. This commit simplifies the logic by passing the base URL as a string to `startBrowsers` and having it do further augmentation internally, thereby removing all indirection of the function calls to `makeTestUrl` and the inner function it returned.
…st.mjs` This commit prepares for the introduction of extra options in later commits by changing the function signatures of the `startBrowser(s)` functions to take parameter objects instead of plain parameters. This makes the call sites explicitly state which parameters they pass, improving overall readability as well.
4f40654 to
335b2a4
Compare
Contributor
Author
|
I have rebased and updated the patch. It now includes a README file about the purpose of the font tests and how to run them locally, as well as a generic |
Snuffleupagus
approved these changes
Nov 12, 2023
Collaborator
Snuffleupagus
left a comment
There was a problem hiding this comment.
I've successfully tested this patch locally, on Windows 11.
r=me, this is awesome; thank you!
This commit prepares for running the font tests on GitHub Actions where we can't spin up headful browsers because there are no display capabilities on the workers. This will also be useful for porting other test targets to GitHub Actions at a later time, as well as running the tests locally in headless mode.
This commit migrates the font tests away from the bots. Not only are the font tests broken on the Windows bot since some time, they also run on Python 2 (end of life since January 2020) and `ttx` 3.19.0 (released in November 2017). The latter is installed via a submodule, which requires more complicated logic for finding and running `ttx`. We solve the issues by implementing a modern workflow that installs the most recent stable Python and `ttx` (`fonttools` package) versions. This simplifies the `ttx` driver code as well because it can now assume `ttx` is available on the path (just like we do for e.g. `node` invocations). GitHub Actions takes care of creating a virtual environment with `fonttools` in it so that the `ttx` entrypoint is available. Locally the font tests can be run in a similar way by creating and sourcing a virtual environment with `fonttools` in it before running the font tests, and a README file is included with instructions for doing so.
335b2a4 to
8157f39
Compare
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.
The commit messages contain more details about the individual changes.
Note that this depends on mozilla/botio-files-pdfjs#42 being merged and deployed to the bots.
Fixes #11802.
Fixes a part of #11851.