-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Introduce a GitHub Actions workflow for running the font tests #17263
Conversation
a8a94d8
to
4f40654
Compare
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
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 |
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.
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
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.