-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ci
: Run tests with nextest
#4740
ci
: Run tests with nextest
#4740
Conversation
6adc112
to
a97f203
Compare
I love this one! Maybe remove d41591f in a new commit |
The change doesn't affect the gnu tests, only the rust tests. It's a replacement for
Ok, no problem |
484496b
to
c02099f
Compare
How to proceed with the avd cache in the github ci? New cache key? I'm asking because this image has a size of more than |
c02099f
to
370d4e9
Compare
This pr is ready for review. The problem with the emulator image seems to have solved itself and the current image in the cache is the one with the |
c22c153
to
3f61f33
Compare
Update: I checked the situation around the avd cache in the github cache again, and I think the safest way to make the caching in the android workflow with the nextest binary work is to change the cache key. |
is it ready for review? |
3f61f33
to
dc775d9
Compare
Sure :) |
.config/nextest.toml
Outdated
@@ -0,0 +1,6 @@ | |||
[profile.ci] | |||
retries = 3 |
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.
actually, i prefer 2, sorry. if a test fails twice, in a row, it is a big deal
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.
No problem.
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.
done
@@ -0,0 +1,6 @@ | |||
[profile.ci] | |||
retries = 3 | |||
status-level = "all" |
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.
could you please document these options?
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.
Would placing a link to the official docs above [profile.ci]
do the job, too?
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.
ok
@tertsdiepraam @cakebaker I think we should take it, WDYT ? |
@sylvestre +1 to give it a try. In the worst case we can easily return to |
env: | ||
RUST_BACKTRACE: "1" | ||
CARGO_TERM_COLOR: "always" |
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.
@sylvestre you previously objected to this change in #4165. Have you changed your mind?
In any case we can specify it just once, like I did in that PR.
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.
yeah, i missed that change
could you please remove it?
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.
In any case we can specify it just once, like I did in that PR.
I activated the colors only for tests, for now. Sorry, I missed the discussion in #4165. Having colors in the ci would be really great, though. @sylvestre Are you looking at the raw logs just locally? Removing the color codes would be a oneliner sed -Ei 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g' PATTERN
.
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.
i am looking at logs in github action too
Apart from the comment above I agree that this can be merged. |
env: | ||
RUST_BACKTRACE: "1" | ||
CARGO_TERM_COLOR: "always" |
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.
CARGO_TERM_COLOR: "always" |
dc775d9
to
3495b82
Compare
GNU testsuite comparison:
|
seems that more people like logs with color than I was expecting. let's do take it then :) |
This pr installs
cargo-nextest
as test runner in ci workflows and jobs previously running tests withcargo test
.nextest comes with a better execution model making it less error prone, so that test binaries exiting with error still report the test which caused the error. It also comes with other features like
Note there's no performance improvement in the ci because of the lack of a multi-core test environment. Together with the installation step of
nextest
the test jobs even take around 5-10 seconds longer.In case of the
android
workflow, thenextest
binary has to be built from source because none of the pre-built binaries works onx86
android targets. The binary is stored in the emulator image, so that step isn't needed often. The caching strategy for the avd cache changed, so that a successfully built image is cached before running the build and test step or else the upload depends on the build and tests running successfully.I added a
nextest
target to theGNUMakefile
instead of replacing the existingtest
target.Before merging this pr it's needed to clear cached emulator images/snapshots from the github caches or else the android workflow fails due the missing
nextest
binary in the currently restored images. We could also change the cache key or maybe there's another possibility?Closes #4737