mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Also add test to lock down example policy path. Also Fix clippy warning by using unwrap_or_default Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: tests/release
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Format Check
|
|
run: cargo fmt --check
|
|
- name: Build (all features)
|
|
run: cargo build -r --all-features
|
|
- name: Build
|
|
run: cargo build -r
|
|
- name: Test no_std
|
|
run: cargo test -r --no-default-features
|
|
- name: Build only std
|
|
run: cargo build -r --example regorus --no-default-features --features "std"
|
|
- name: Doc Tests
|
|
run: cargo test -r --doc
|
|
- name: Run tests
|
|
run: cargo test -r
|
|
- name: Run example
|
|
run: cargo run --example regorus -- eval -d examples/server/allowed_server.rego -i examples/server/input.json data.example
|
|
- name: Run tests (ACI)
|
|
run: cargo test -r --test aci
|
|
- name: Run tests (KATA)
|
|
run: cargo test -r --test kata
|
|
- name: Run tests (OPA Conformance)
|
|
run: >-
|
|
cargo test -r --test opa --features opa-testutil,serde_json/arbitrary_precision -- $(tr '\n' ' ' < tests/opa.passing)
|