One year ago, I introduced cargo-difftests for the first time. I don’t believe I did the project justice the last time, writing a long post which contained a few too many commands. But I would like to change that, and to show how far it’s come since.

So, without further ado, let’s demonstrate what it’s like to work with it now, and in what better way to do that than with an asciinema cast?

(The commands used are taken from usage)

As you can see, rather than it spitting out endless JSON, it can now do something with it without the need of helper binaries.

For most rust projects out there, where to run tests everything that is needed is just a simple cargo test, cargo-difftests now does most of the work.

Rerun dirty action

There’s now an accompanying repository, cargo-difftests-rerun-dirty-action, whose sole purpose is to have a GitHub action that would rerun the dirty tests given some git diff. It makes use (by default) of the --algo=git-diff-files algorithm. The cargo-difftests repo uses this action to rerun dirty tests on pushes to trunk and PRs. It can be used to give faster feedback to contributors, but a full run of the test suite is always recommended. You use this as a template, should you want to.

Curious now?

Feel free to give it a try. I would honestly love some feedback, as I have really few ideas on how to improve cargo-difftests further beyond where it is right now, so I would love to hear from you.