Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/test-doc.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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::)'"
Expand Down
Loading