-
Notifications
You must be signed in to change notification settings - Fork 0
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: add cargo test reporting #56
Conversation
@@ -41,7 +41,7 @@ | |||
]; | |||
perSystem = { config, self', inputs', system, pkgs, lib, ... }: | |||
let | |||
rustToolchain = inputs'.fenix.packages.stable.toolchain; | |||
rustToolchain = inputs'.fenix.packages.latest.toolchain; |
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 would like to avoid using nigthly toolchain.
@@ -83,6 +83,11 @@ | |||
|
|||
kairos = craneLib.buildPackage (kairosNodeAttrs // { | |||
cargoArtifacts = self'.packages.kairos-deps; | |||
cargoTestExtraArgs = "-- -Z unstable-options --format json --report-time | tee test-output.json"; |
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.
cargoTestExtraArgs = "-- -Z unstable-options --format json --report-time | tee test-output.json"; | |
cargoTestExtraArgs = "-- --format json --report-time | tee test-output.json"; |
Would this work?
Edit: Okay, I see cargo test
has no structured output without unstable option to get JSON 😨 .
|
||
- name: Create JUnit Kairos Test Report x86_64-linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: cat kairos-result/test-result.json | nix run nixpkgs#cargo2junit > kairos-test-result.xml |
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.
Using cargo2junit
forces us to use nigthly toolchain 😞.
What about using cargo nextest
instead of default cargo test runner? Nextest has JUnit output and it was designed for usage in CI.
No description provided.