ci: Enable doctests

Unfortunately nextest does not support doc tests yet, they need to be
run using cargo test.
This commit is contained in:
Kamil Jarosz 2024-08-31 12:48:36 +02:00 committed by TÖRÖK Attila
parent 7d5059ab45
commit d75d6da39e
1 changed files with 21 additions and 12 deletions

View File

@ -12,6 +12,22 @@ concurrency:
env: env:
FEATURES: lzma,jpegxr FEATURES: lzma,jpegxr
TEST_OPTS: --workspace --locked --no-fail-fast -j 4
# This is to counteract the disabling by rust-cache.
# See: https://github.com/Swatinem/rust-cache/issues/43
CARGO_INCREMENTAL: '1'
# Supposedly makes "Updating crates.io index" faster on Windows.
# See: https://github.com/rust-lang/cargo/issues/9167
CARGO_NET_GIT_FETCH_WITH_CLI: 'true'
# Workaround for: https://github.com/nextest-rs/nextest/issues/1493
# See also: https://github.com/rust-lang/rustup/issues/3825
RUSTUP_WINDOWS_PATH_ADD_BIN: '1'
# (Linux) Just to silence warnings about it missing
XDG_RUNTIME_DIR: ''
jobs: jobs:
changes: changes:
@ -88,18 +104,11 @@ jobs:
- name: Run tests - name: Run tests
shell: bash shell: bash
run: cargo nextest run --profile ci --cargo-profile ci --workspace --locked --no-fail-fast -j 4 --features ${FEATURES} run: cargo nextest run --profile ci --cargo-profile ci ${TEST_OPTS} --features ${FEATURES}
env:
# This is to counteract the disabling by rust-cache. - name: Run doctests
# See: https://github.com/Swatinem/rust-cache/issues/43 shell: bash
CARGO_INCREMENTAL: '1' run: cargo test --doc --profile ci ${TEST_OPTS} --features ${FEATURES}
# Supposedly makes "Updating crates.io index" faster on Windows.
# See: https://github.com/rust-lang/cargo/issues/9167
CARGO_NET_GIT_FETCH_WITH_CLI: 'true'
# Workaround for: https://github.com/nextest-rs/nextest/issues/1493
# See also: https://github.com/rust-lang/rustup/issues/3825
RUSTUP_WINDOWS_PATH_ADD_BIN: '1'
XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing
- name: Upload images - name: Upload images
if: failure() if: failure()