Skip to content

Commit a8f5ac6

Browse files
committed
fix: Run pre-commit tests in debug mode
Release mode uses LTO optimization for binaries. This can take up a lot of time especially for doc tests which create a separate binary for each test. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
1 parent 632f64b commit a8f5ac6

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

scripts/pre-push

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ -f Cargo.toml ]; then
1010
"$dir/pre-commit"
1111

1212
# Ensure that the public API works.
13-
cargo test -r --doc
13+
cargo test --doc
1414

1515
# Ensure that no_std build succeeds.
1616
# Build for a target that has no std available.
@@ -20,21 +20,21 @@ if [ -f Cargo.toml ]; then
2020
fi
2121

2222
# Ensure that we can build with only std.
23-
cargo build -r --example regorus --no-default-features --features std
23+
cargo build --example regorus --no-default-features --features std
2424

2525
# Ensure that we can build with all features.
26-
cargo build -r --all-features
26+
cargo build --all-features
2727

2828
# Ensure that all tests pass.
29-
cargo test -r
30-
cargo test -r --test aci
31-
cargo test -r --test kata
29+
cargo test
30+
cargo test --test aci
31+
cargo test --test kata
3232

3333
# Ensure that all tests pass with extensions
34-
cargo test -r --features rego-extensions
35-
cargo test -r --test aci --features rego-extensions
36-
cargo test -r --test kata --features rego-extensions
34+
cargo test --features rego-extensions
35+
cargo test --test aci --features rego-extensions
36+
cargo test --test kata --features rego-extensions
3737

3838
# Ensure that OPA conformance tests don't regress.
39-
cargo test -r --features opa-testutil,serde_json/arbitrary_precision,rego-extensions --test opa -- $(tr '\n' ' ' < tests/opa.passing)
39+
cargo test --features opa-testutil,serde_json/arbitrary_precision,rego-extensions --test opa -- $(tr '\n' ' ' < tests/opa.passing)
4040
fi

0 commit comments

Comments
 (0)