Currently `mix test --stale` will do some checks for code that has been 
updated since the last test suite run. Relevant 
code: 
https://github.com/elixir-lang/elixir/blob/4fa224099730f59b19912e605a888bab68da6e5b/lib/mix/lib/mix/compilers/test.ex#L119-L176

For the purposes of larger Elixir projects and CI, it'd be nice to fetch 
the list of tests that need to be rerun but not rerun them in the same 
command.

This has partially been brought up 
before: 
https://elixirforum.com/t/is-there-a-way-to-predetermine-which-tests-and-why-would-be-run-on-mix-test-stale/48325

The most basic implementation idea I had for this was `mix test 
--print-stale` which prints all currently stale tests to stdout (or to a 
file?).

Another possibly nice feature would be the ability to provide a commit hash 
similar to Credo's git diff https://hexdocs.pm/credo/diff_command.html that 
shows which tests are "stale" between two points in time. The usefulness of 
this idea may be limited.

tldr I want to be able to configure my CI to not run ALL tests on every 
single PR. There are other ways to do this, but providing the data that 
`mix test --stale` uses to determine staleness seems like a great start!

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/elixir-lang-core/906a55e5-1b0d-4f4b-813e-43d5afd35b46n%40googlegroups.com.

Reply via email to