Skip to content

Commit

Permalink
[ci] upload JUnit reports as artifacts
Browse files Browse the repository at this point in the history
Allows for easier inspection.
  • Loading branch information
sunshowers committed Dec 11, 2024
1 parent 4024461 commit ab91a4c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ jobs:
run: cargo test --doc
- name: Test with locally built nextest
run: cargo local-nt run --profile ci

- name: Upload results
# Run this step even if the test step ahead fails
# Run this step even if the test step fails
if: "!cancelled()"
uses: trunk-io/analytics-uploader@main
with:
Expand All @@ -104,6 +105,19 @@ jobs:
# Provide your Trunk API token as a GitHub secret.
token: ${{ secrets.TRUNK_API_TOKEN }}
continue-on-error: true

- name: Upload JUnit report
# Run this step even if the test step fails. Upload it right now because
# we're most interested in the JUnit report generated by the local
# version of nextest, not the latest release.
if: "!cancelled()"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: junit-${{ matrix.os }}-${{ matrix.rust-version }}.xml
path: |
target/nextest/ci/junit.xml
if-no-files-found: error

- name: Test with latest nextest release
run: cargo nextest run --profile ci
- name: Test without double-spawning
Expand Down
6 changes: 3 additions & 3 deletions nextest-runner/src/config/scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ impl ScriptConfig {
pub struct ScriptJunitConfig {
/// Whether to store successful output.
///
/// Defaults to false.
#[serde(default)]
/// Defaults to true.
#[serde(default = "default_true")]
pub store_success_output: bool,

/// Whether to store failing output.
Expand All @@ -553,7 +553,7 @@ pub struct ScriptJunitConfig {
impl Default for ScriptJunitConfig {
fn default() -> Self {
Self {
store_success_output: false,
store_success_output: true,
store_failure_output: true,
}
}
Expand Down

0 comments on commit ab91a4c

Please sign in to comment.