mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-03-26 17:08:17 +00:00
For the Python-based workflows we were already using `pip` caching [1], but sadly this isn't fully functional at the moment because the caching functionality uses `requirements.txt` to determine when to create or invalidate the cache. However, we have two different `pip` install commands but only a `requirements.txt` for one of them (the Fluent linter), which means that the other job (the font tests) will not populate the cache with its dependencies. This can be seen by opening any font tests or Fluent linting build and noticing that they report the exact same cache key even though their dependencies are different. In the installation step the dependencies are reported as "Downloading [package].whl" instead of the expected "Using cached [package].whl". This commit fixes the issue by explicitly defining a `requirements.txt` file for both jobs and pointing the caching functionality to the specific file paths to make sure that unique caches with the correct package data are used. While we're here we also align the syntax and step titles in the files for consistency. [1] https://github.com/actions/setup-python?tab=readme-ov-file#caching-packages-dependencies