Skip to content

Commit 3ca5dc4

Browse files
committed
Make sure CI runs doc tests again
I accidentally removed execution of doc tests on CI when I added the `--all-targets` switch to `cargo test` in order to run benchmarks as tests. It turns out that `cargo test --all-targets` doesn't run doc tests (see rust-lang/cargo#6669 ). The solution for running both doc tests and benchmarks as tests seems to be to leave out the `--all-target` switch and instead mark benchmarks with `test=true` in `Cargo.toml` (see rust-lang/cargo#6669 (comment) ).
1 parent d56636f commit 3ca5dc4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@ jobs:
4848
- name: Test in development mode
4949
env:
5050
RUSTFLAGS: "-D warnings"
51-
run: cargo test --all-targets
52-
51+
run: cargo test
5352
- name: Test in release mode
5453
env:
5554
RUSTFLAGS: "-D warnings"
56-
run: cargo test --release --all-targets
55+
run: cargo test --release
5756

5857
miri-test:
5958
name: no_std and miri
@@ -104,7 +103,7 @@ jobs:
104103
env:
105104
RUSTFLAGS: "-Zrandomize-layout"
106105
MIRIFLAGS: "-Zmiri-symbolic-alignment-check -Zmiri-disable-isolation"
107-
run: cargo +${{ steps.rust-version.outputs.rustc }} miri test --no-fail-fast --all-targets
106+
run: cargo +${{ steps.rust-version.outputs.rustc }} miri test --no-fail-fast
108107

109108
python-test:
110109
runs-on: ${{ matrix.os }}

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ jobs:
6060
- name: Test in development mode
6161
env:
6262
RUSTFLAGS: "-D warnings"
63-
run: cargo test --all-targets
63+
run: cargo test
6464

6565
- name: Test in release mode
6666
env:
6767
RUSTFLAGS: "-D warnings"
68-
run: cargo test --release --all-targets
68+
run: cargo test --release
6969

7070
miri-test:
7171
name: no_std and miri
@@ -129,7 +129,7 @@ jobs:
129129
env:
130130
RUSTFLAGS: "-Zrandomize-layout"
131131
MIRIFLAGS: "-Zmiri-symbolic-alignment-check -Zmiri-disable-isolation"
132-
run: cargo +${{ steps.rust-version.outputs.rustc }} miri test --no-fail-fast --all-targets
132+
run: cargo +${{ steps.rust-version.outputs.rustc }} miri test --no-fail-fast
133133

134134
python-test:
135135
runs-on: ${{ matrix.os }}

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ rand_xoshiro = "0.6"
5050
[[bench]]
5151
harness = false
5252
name = "lookup"
53+
test = true

0 commit comments

Comments
 (0)