Files
regorus/scripts/pre-push
Anand Krishnamoorthi 4db2270dcf More library functions (#51)
- units.parse, units.parse_bytes
- json.is_valid, json.marshal, json.unmarshal
- yaml.is_valid, yaml.marshal, yaml.unmarshal
- object.subset
- set_diff

* Also print number of errors due to each missing function
* Also lock down fully passing OPA suites

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-11-22 14:19:23 -08:00

21 lines
485 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 --test opa -- $(tr '\n' ' ' < tests/opa.passing)
fi