google / pytype

A static type analyzer for Python code
https://google.github.io/pytype
Other
4.78k stars 280 forks source link

CI: Parallelize the test jobs into shards #1773

Closed copybara-service[bot] closed 2 months ago

copybara-service[bot] commented 2 months ago

CI: Parallelize the test jobs into shards

(Also split out the pytype+pylint checks into separate jobs)

In addition to the target test_all that depends on all tests, define targets such as test_all_shard_1_of_3 which include an arbitrary but stable subset of targets. Then, use those new group targets in separate GitHub Actions jobs.

The _of_3 part is important because it guarantees a hard breakage in case one system is updated to generate more shards but the other one is not update to run them, by mistake.