Skip to content

Commit

Permalink
only run doctests on stable
Browse files Browse the repository at this point in the history
MSRV Rust doesn't have std::pin::pin, which we want to preferentially
suggest in documentation.
  • Loading branch information
sunshowers committed Jul 25, 2023
1 parent 09d1591 commit e997d2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
run: ./scripts/commands.sh build
- name: Test
run: ./scripts/commands.sh test
- name: Run doctests
if: matrix.rust-version == 'stable'
run: ./scripts/commands.sh doctest

no-std:
name: Build no_std for ${{ matrix.target }}
Expand Down
5 changes: 4 additions & 1 deletion scripts/commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ run_test() {

echo_err "Running non-doc tests"
run_cargo_hack test --lib --bins --tests --benches --examples
}

run_doctest() {
echo_err "Running doctests"
cargo test --doc

Expand Down Expand Up @@ -72,7 +74,7 @@ run_cargo_hack_no_std() {
}

if [[ $# -eq 0 ]]; then
echo_err "Usage: with-feature-powerset.sh [b|build|t|test|build-no-std]"
echo_err "Usage: with-feature-powerset.sh [b|build|t|test|dt|doctest|build-no-std]"
exit 1
fi

Expand All @@ -81,6 +83,7 @@ while [[ "$#" -gt 0 ]]; do
+*) CARGO="$CARGO $1" ;;
b|build) run_build ;;
t|test) run_test ;;
dt|doctest) run_doctest ;;
build-no-std)
shift;
case $1 in
Expand Down

0 comments on commit e997d2f

Please sign in to comment.