Files
regorus/scripts/pre-push
2023-12-16 17:50:59 -08:00

21 lines
488 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -eo pipefail
if [ -f Cargo.toml ]; then
# Run precommit checks
dir=$(dirname "${BASH_SOURCE[0]}")
"$dir/pre-commit"
# Ensure that all tests pass
# Also generate coverage information.
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
scripts/coverage
fi
# Ensure that OPA conformance tests don't regress.
cargo test -r --test opa -- $(tr '\n' ' ' < tests/opa.passing)
fi