Skip to content

Commit ff05fae

Browse files
committed
test: Improve test work flow
Changes to cargo hack for 32 and 64 bit: * make sure doc tests are run * make sure that default features are tested For 32 bit: * run cargo hack check for all targets + powerset For valgrind: * run all targets and doc tests
1 parent 722a934 commit ff05fae

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/test32bit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
- name: Install rust tooling for 32 bit builds
3939
run: |
4040
rustup target install i686-unknown-linux-gnu
41+
- name: cargo check
42+
run: |
43+
cargo hack check --all-targets --target=i686-unknown-linux-gnu --feature-powerset
4144
- name: cargo tests
4245
run: |
4346
cargo hack test --target=i686-unknown-linux-gnu --feature-powerset
47+
- name: cargo doc tests
48+
run: |
49+
cargo hack test --doc --target=i686-unknown-linux-gnu --feature-powerset

.github/workflows/tests.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ jobs:
3535
- run: sudo apt-get update -y
3636
if: matrix.os == 'ubuntu-latest'
3737
- name: cargo check (powerset)
38-
run: cargo hack check --feature-powerset --no-dev-deps --exclude-no-default-features
39-
- name: cargo check examples
40-
run: cargo hack check --examples --feature-powerset --exclude-no-default-features
41-
- name: run tests
38+
run: cargo hack check --feature-powerset --no-dev-deps
39+
- name: cargo check examples (powerset)
40+
run: cargo hack check --examples --feature-powerset
41+
- name: run tests (powerset)
4242
run: |
43-
cargo hack test --feature-powerset --exclude-no-default-features
44-
cargo hack test --examples --feature-powerset --exclude-no-default-features
43+
cargo hack test --all-targets --feature-powerset
44+
- name: run doc tests (powerset)
45+
run: |
46+
cargo hack test --doc --feature-powerset
4547
4648
fmt:
4749
name: rust fmt

.github/workflows/valgrind.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ jobs:
3535
- run: cargo install cargo-valgrind
3636
- name: run cargo valgrind
3737
run: |
38-
cargo valgrind test --all-features
38+
cargo valgrind test --all-targets --all-features
39+
- name: run cargo valgrind on doc tests
40+
run: |
41+
cargo valgrind test --doc --all-features

0 commit comments

Comments
 (0)