diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-17 15:14:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-17 15:14:54 +0000 |
commit | 46d07ca5c2b729d6396723290a875a317b2845ee (patch) | |
tree | cb4c7572244aa2ed873c848b4794ddb1dcfa45a5 /doc/ci/testing/unit_test_report_examples.md | |
parent | db30b31f056d0de120d9238a7786e19cafbce69f (diff) | |
download | gitlab-ce-46d07ca5c2b729d6396723290a875a317b2845ee.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/testing/unit_test_report_examples.md')
-rw-r--r-- | doc/ci/testing/unit_test_report_examples.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/ci/testing/unit_test_report_examples.md b/doc/ci/testing/unit_test_report_examples.md index 41dfc8fc60b..c63e225a2a7 100644 --- a/doc/ci/testing/unit_test_report_examples.md +++ b/doc/ci/testing/unit_test_report_examples.md @@ -274,3 +274,24 @@ phpunit: reports: junit: report.xml ``` + +## Rust + +This example uses [cargo2junit](https://crates.io/crates/cargo2junit), +which is installed in the current directory. +To retrieve JSON output from `cargo test`, you must enable the nightly compiler. + +```yaml +run unittests: + image: rust:latest + stage: test + before_script: + - cargo install --root . cargo2junit + script: + - cargo test -- -Z unstable-options --format json --report-time | bin/cargo2junit > report.xml + artifacts: + when: always + reports: + junit: + - report.xml +``` |