From 60a04424ef8f15113e8a0863957575847972ebce Mon Sep 17 00:00:00 2001 From: Igor Unanua Date: Wed, 4 Mar 2026 14:45:24 +0100 Subject: [PATCH 1/3] Run test --doc in a workflow only for ubuntu --- .github/workflows/test-doc.yml | 40 ++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 4 ++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-doc.yml diff --git a/.github/workflows/test-doc.yml b/.github/workflows/test-doc.yml new file mode 100644 index 0000000000..b4aa884689 --- /dev/null +++ b/.github/workflows/test-doc.yml @@ -0,0 +1,40 @@ +name: Test doc +on: [push] +env: + CARGO_TERM_COLOR: always + RUST_VERSION: 1.84.1 + +jobs: + test-doc: + name: "[${{ matrix.rust_version }}] cargo test --doc" + runs-on: ubuntu-latest + permissions: + checks: write + contents: read + env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + strategy: + matrix: + rust_version: ["${RUST_VERSION}", "stable"] + fail-fast: false + steps: + - name: Checkout sources + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 + - name: Install Rust ${{ matrix.rust_version }} + run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }} + - name: Cache [rust] + uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 + with: + cache-targets: true + cache-bin: true + - id: rust-version + run: bash -c 'echo "version=$(rustc --version)" >> $GITHUB_OUTPUT' + - name: "[${{ steps.rust-version.outputs.version }}] cargo build --workspace --exclude builder --verbose" + shell: bash + run: cargo build --workspace --exclude builder --verbose + - name: "[${{ steps.rust-version.outputs.version }}] cargo test --doc" + shell: bash + run: cargo test --workspace --features libdd-crashtracker/generate-unit-test-files --exclude builder --doc --verbose + env: + RUST_BACKTRACE: full diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 258cefff39..dc95db035e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,8 +59,8 @@ jobs: run: cargo build --workspace --exclude builder --verbose - name: "[${{ steps.rust-version.outputs.version}}] cargo nextest run --workspace --features libdd-crashtracker/generate-unit-test-files --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'" shell: bash - # Run doc tests with cargo test and run tests with nextest and generate junit.xml - run: cargo test --workspace --features libdd-crashtracker/generate-unit-test-files --exclude builder --doc --verbose && cargo nextest run --workspace --features libdd-crashtracker/generate-unit-test-files --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)' + # Run tests with nextest and generate junit.xml + run: cargo nextest run --workspace --features libdd-crashtracker/generate-unit-test-files --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)' env: RUST_BACKTRACE: full - name: "[${{ steps.rust-version.outputs.version}}] Tracing integration tests: cargo nextest run --workspace --features libdd-crashtracker/generate-unit-test-files --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'" From 027e1aa43242f0ed43ad1ecc4eb2e0f3eee767c3 Mon Sep 17 00:00:00 2001 From: Igor Unanua Date: Wed, 4 Mar 2026 15:39:03 +0100 Subject: [PATCH 2/3] do not run test-docs in cross-centos7 job --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc95db035e..84de82824f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -304,8 +304,8 @@ jobs: cache-bin: true # cache the ~/.cargo/bin directory - run: cargo install cross || true - run: cross build --workspace --target x86_64-unknown-linux-gnu --exclude builder - - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::" - - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --exclude bin_tests -- --skip "::tests::" --skip "::api_tests::" --test-threads 1 --skip "tracing_integration_tests::" + - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --no-doc -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::" + - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --no-doc --exclude bin_tests -- --skip "::tests::" --skip "::api_tests::" --test-threads 1 --skip "tracing_integration_tests::" ffi_bake: strategy: From a722b5f571b67ca5d47ae80541741b1fd9ec47b1 Mon Sep 17 00:00:00 2001 From: Igor Unanua Date: Thu, 5 Mar 2026 09:04:11 +0100 Subject: [PATCH 3/3] run test-docs in cross-centos7 job --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84de82824f..dc95db035e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -304,8 +304,8 @@ jobs: cache-bin: true # cache the ~/.cargo/bin directory - run: cargo install cross || true - run: cross build --workspace --target x86_64-unknown-linux-gnu --exclude builder - - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --no-doc -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::" - - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --no-doc --exclude bin_tests -- --skip "::tests::" --skip "::api_tests::" --test-threads 1 --skip "tracing_integration_tests::" + - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::" + - run: cross test --workspace --features libdd-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --exclude bin_tests -- --skip "::tests::" --skip "::api_tests::" --test-threads 1 --skip "tracing_integration_tests::" ffi_bake: strategy: