Run OPA Tests #921
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run OPA Tests | |
on: | |
# Run tests on each commit, newly opened/reopened PR, and | |
# PR review submission (e.g. approval) | |
workflow_dispatch: | |
push: | |
paths: | |
- "**.rego" | |
- "**/run_opa_tests.yaml" | |
pull_request: | |
types: [opened, reopened] | |
branches: | |
- "main" | |
- "emerald" #TODO: Remove after emerald release | |
paths: | |
- "**.rego" | |
pull_request_review: | |
types: [submitted] | |
jobs: | |
Run-OPA-Tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup OPA | |
uses: open-policy-agent/setup-opa@v2 | |
with: | |
version: <0.50 | |
- name: Run OPA Check | |
run: opa check Rego Testing/Unit/Rego --strict | |
- name: Run OPA Tests | |
run: opa test Rego/*.rego Rego/Utils/*.rego Testing/Unit/Rego/**/*.rego -v |