Skip to content

Running tests and checks for policies #2

Running tests and checks for policies

Running tests and checks for policies #2

Workflow file for this run

name: Test and Check
run-name: Running tests and checks for policies
on: [push]
jobs:
Test-And-Check:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup OPA
uses: open-policy-agent/setup-opa@v2
with:
version: latest
- name: Run OPA Tests
run: opa test policies
- name: Run OPA Check
run: opa check policies
- name: Run OPA Build
run: |
mkdir -p dist/
opa build -b policies -o dist/bundle.tar.gz
- name: Bundle
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/bundle.tar.gz