pants: Github CI should fail early on modified code/failing tests
Per the Slack chat (https://pantsbuild.slack.com/archives/C0D7TNJHL/p1652363391676529)
I’m sure this has been discussed a bunch, but is there any way to “speed up” the PR CI testing, or at least, short-circuit some of it? I’m adding a pretty isolated formatting plugin, but the testing is still around 50 minutes for a test failure which didn’t show up on my local machine (for some reason, not sure why it passed locally). Is the pants dependency inference good enough that a simple ./pants --changed-since=… test would be safe for the PR? If not, maybe run that test before running the whole suite? That way, if any of the modified code is breaking, CI will fail fast? And if not, we just fallback to a regular full test suite (with the modified code test results memoized)?
The summary of the chat is that it might be worth having a sanity test before running the test suite, which would probably fail within a few minutes, if it is going to fail on newly PR’d code.
./pants --changed-since=origin/main test
# followed by
./pants test --shard=... ::
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 15 (15 by maintainers)
Most Pants changes affect large numbers of tests, especially the slow integration tests. So I’m wondering if this will actually be effective in practice?