feat(rust) :: add mutants.rs as nonblocking step to CI - #1395
Closed
81reap wants to merge 1 commit into
Closed
Conversation
81reap
commented
Aug 22, 2026
Comment on lines
+546
to
+572
|
|
||
| mutants: | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| continue-on-error: true | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: taiki-e/install-action@v2 | ||
| with: | ||
| tool: cargo-mutants | ||
| - name: Set up cargo cache | ||
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 | ||
| with: | ||
| shared-key: rust-sqlpage-mutants | ||
| save-if: ${{ github.ref == 'refs/heads/main' }} | ||
| - name: Mutate only the lines this pull request changed | ||
| run: | | ||
| git diff "origin/${{ github.base_ref }}...HEAD" > mutants.diff | ||
| cargo mutants --in-diff mutants.diff --jobs 2 | ||
| - uses: actions/upload-artifact@v7 | ||
| if: always() | ||
| with: | ||
| name: mutants-report | ||
| path: mutants.out/ |
Contributor
Author
There was a problem hiding this comment.
hmm, I was under the impression that this would also run in the CI so that I could show it as working
Collaborator
|
See my comment on the associated issue. Most of what this surfaces sounds like noise to me. 100% test coverage is not a useful goal IMHO. New tests are welcome, but each one should come with a reasonable argument for why it is testing an important invariant that could realistically break in the future. Other tests just add churn and slow down development. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds mutation testing for Rust as a non-blocking step to the CI :: https://mutants.rs/
This step is non-blocking as it does find issues, but it is up to the reader to interpret the results (at least for me I don't know of a quick way to do it just yet). It also is kinda really slow. I ran it over the entire codebase on my Ryzen 7 5800X3D ~3h (09:56 → 13:07). I left it running through the day as I was at work and these are the results.
{ "cargo_mutants_version": "27.1.0", "start_time": "2026-08-21T13:56:34.66744901Z", "hostname": "jager", "username": "reap" }see #1396 for a more detailed breakdown of the full run
the goal is to break down these things into groups and create an issue to dicuss more about how this can help improve the codebase. this also is an progammatic way to catch the remaining issues called out in #1389