-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(config): add max-fail option to configuration file #2063
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2063 +/- ##
==========================================
+ Coverage 79.97% 80.05% +0.08%
==========================================
Files 102 102
Lines 23997 24117 +120
==========================================
+ Hits 19192 19308 +116
- Misses 4805 4809 +4 ☔ View full report in Codecov by Sentry. |
f1bbf32
to
55932a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
nextest-runner/default-config.toml
Outdated
# "max-fail" defines the maximum number of test failures that are allowed before test execution is stopped. | ||
max-fail = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think this should actually be part of the fail-fast
field. This field currently supports true or false, but it should also support
fail-fast = { max-fail = 1 }
This addresses issues like precedence, and matches the CLI behavior where --fail-fast
and --max-fail=1
cannot be specified together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, Im going to try to do it
@@ -83,4 +130,126 @@ mod tests { | |||
MaxFail::from_str(input).expect_err(&format!("expected input '{input}' to fail")); | |||
} | |||
} | |||
|
|||
#[test_case( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are fantastic, thank you!
Tested the config on one of my rust repo, it's working good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you! I have a couple minor changes I'll take care of.
7a022a9
to
d3f1eff
Compare
I've combined max-fail and fail-fast into a single struct, and added tests for error messages (i.e. not just that there are errors). |
d3f1eff
to
18946d0
Compare
18946d0
to
229ab71
Compare
Closes #1944