Skip to content

Commit

Permalink
Run these stupid doc tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
flub committed Dec 2, 2024
1 parent eeb3f6f commit be50d3a
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ jobs:
targets="--lib --bins"
echo cargo check -p $i $FEATURES $targets
cargo check -p $i $FEATURES $targets
echo cargo test --doc --no-run $FEATURES
cargo test --doc --no-run $FEATURES
done
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
Expand Down Expand Up @@ -129,14 +127,25 @@ jobs:

- name: doctests
if: ${{ (! inputs.flaky) && matrix.features == 'all' }}
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
run: |
if [ -n "${{ runner.debug }}" ]; then
export RUST_LOG=TRACE
else
export RUST_LOG=DEBUG
fi
cargo test --workspace --all-features --doc
# We can not check the doctest features by only compiling them,
# so are forced to run them once more.
- name: Check doctest features
if: ${{ ! inputs.flaky }}
env:
RUST_LOG: ${{ runner.debug && 'TRACE' || 'DEBUG'}}
run: |
for i in ${CRATES_LIST//,/ }
do
echo "Checking $i doctest $FEATURES"
echo cargo test -p $i --doc $FEATURES
cargo test -p $i --doc $FEATURES
done
build_and_test_windows:
timeout-minutes: 30
name: "Tests"
Expand Down

0 comments on commit be50d3a

Please sign in to comment.