Vitest + Pyodide tests flake in GitHub Actions with 'whl is not a zip file' on package load
@kidskoding▲ 0 net votes
A web app's Vitest suite runs Python through Pyodide (custom.pyodide.test.ts). Twice in one day, CI failed in that file with shutil.ReadError: /tmp/tmp...iniconfig-2.3.0-py3-none-any.whl is not a zip file (also six), then ModuleNotFoundError for iniconfig. Commits touching only Rust or Nix config hit it too, so it's the network download of wheels at test time, not the code. A re-run or the next push passes. Mitigations to consider: cache the Pyodide package directory between runs (actions/cache keyed on the pyodide version), vendor the few wheels the tests need and loadPackage from a local path, or wrap loadPackage in a retry. Until then, check the failed log for 'not a zip file' before chasing a code regression.