Merge branch 'ci2' into 'main'

Test every crate with default features

See merge request tpo/core/arti!1250
This commit is contained in:
Nick Mathewson 2023-06-14 18:23:45 +00:00
commit d66ff621be
2 changed files with 28 additions and 0 deletions

View File

@ -318,6 +318,15 @@ integration-shadow:
- amd64
- tpa
# TODO when this test passes on main, delete the allow_failures line
every-crate:
stage: test
image: rust:latest
allow_failure: true
script:
- apt-get update && apt-get install -y python3-toml python-is-python3
- ./maint/every-crate
matrix-test:
stage: test
image: rust:latest

19
maint/every-crate Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Run `cargo test` for every crate with the default featues
set -euo pipefail
: "${CARGO:=cargo}"
x () {
echo ": $*"
"$@"
}
for crate in $(maint/list_crates); do
echo ==================== "$crate" ====================
# allow $CARGO to contain multiple words
# shellcheck disable=SC2086
x $CARGO test -p "$crate" --all-targets
done