3 ms·
How are changes determined I wonder. By comparing to master? The article mentions test impact analyses going off of PR changes, but what about un-pushed local c
by t1E9mE7JTRjf 2y ago
How are changes determined I wonder. By comparing to master?
The article mentions test impact analyses going off of PR changes, but what about un-pushed local changes for when I just want to speed up local tests as I work in dev (apologies if this is a newb question).
- KingMob 2y agoNo, it's a good question. My tool spdr allows you to select the ref to compare to, but the default "smart" mode uses two different behaviors, depending on whether it's run locally or in CI. If it's local, it compares all changes against HEAD (both staged and unstaged, but you can change that). If there's no uncommitted changes, like for a fresh CI checkout, it assumes it's in CI, so it should compare to the base of the PR. (For the moment, spdr just diffs with parents in CI, but I'm currently working on detecting the PR base ref. They all have different environment variables for indicating that.)
- KingMob 2y agoIf you're using `pytest --some-options` locally, preface it with `spdr`, like `spdr pytest --some-options`. If you want help, run `spdr --help`.