From 65d33b371517139e0dc3a4a1e6deba8576e21676 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Fri, 15 Apr 2022 21:40:27 -0400 Subject: [PATCH] Split out rust doc tests in CI (#24397) --- ci/buildkite-pipeline.sh | 12 ++++++++++++ ci/test-docs.sh | 1 + ci/test-stable.sh | 6 +++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 120000 ci/test-docs.sh diff --git a/ci/buildkite-pipeline.sh b/ci/buildkite-pipeline.sh index 47f63518c..afac1ef88 100755 --- a/ci/buildkite-pipeline.sh +++ b/ci/buildkite-pipeline.sh @@ -148,6 +148,18 @@ all_test_steps() { # Full test suite command_step stable ". ci/rust-version.sh; ci/docker-run.sh \$\$rust_stable_docker_image ci/test-stable.sh" 70 + + # Docs tests + if affects \ + .rs$ \ + ^ci/rust-version.sh \ + ^ci/test-docs.sh \ + ; then + command_step doctest "ci/test-docs.sh" 15 + else + annotate --style info --context test-docs \ + "Docs skipped as no .rs files were modified" + fi wait_step # BPF test suite diff --git a/ci/test-docs.sh b/ci/test-docs.sh new file mode 120000 index 000000000..0c92a5c7b --- /dev/null +++ b/ci/test-docs.sh @@ -0,0 +1 @@ +test-stable.sh \ No newline at end of file diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 25e98116d..1bb2db569 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -30,7 +30,7 @@ JOBS=$((JOBS>NPROC ? NPROC : JOBS)) echo "Executing $testName" case $testName in test-stable) - _ "$cargo" stable test --jobs "$JOBS" --all --exclude solana-local-cluster ${V:+--verbose} -- --nocapture + _ "$cargo" stable test --jobs "$JOBS" --all --tests --exclude solana-local-cluster ${V:+--verbose} -- --nocapture ;; test-stable-bpf) # Clear the C dependency files, if dependency moves these files are not regenerated @@ -130,6 +130,10 @@ test-wasm) done exit 0 ;; +test-docs) + _ "$cargo" stable test --jobs "$JOBS" --all --doc --exclude solana-local-cluster ${V:+--verbose} -- --nocapture + exit 0 + ;; *) echo "Error: Unknown test: $testName" ;;