Skip to content

Commit

Permalink
Adding OPA tests to this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
salgattcy committed Oct 31, 2023
1 parent 4d0f37b commit 43aa290
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/opa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Rego Policies

on:
push:
paths:
- 'Terraform_Examples/resource_files/data_label_rego/*'
- '.github/workflows/opa.yml'

jobs:
Run-OPA-Tests:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- Terraform_Examples/resource_files/data_label_rego

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup OPA
uses: open-policy-agent/setup-opa@v2
with:
version: latest

- name: Run Rego Policy Tests
run: opa test ${{ matrix.package }} -v

0 comments on commit 43aa290

Please sign in to comment.