Skip to content

fix: trigger-dependencies-via-labels.yml source #202

fix: trigger-dependencies-via-labels.yml source

fix: trigger-dependencies-via-labels.yml source #202

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
regal-check:
name: Regal Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Regal
uses: StyraInc/setup-regal@v1
with:
version: v0.11.0
- run: regal lint --format=github .
syntax-check:
name: Syntax Check
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install OPA
uses: open-policy-agent/setup-opa@v2
with:
version: 0.64.0
- name: Check syntax
run: |
# KLUDGE: plan/check-sanitized-value.rego needs to be ignored because it uses the custom sanitized() function
find . -name \*.rego ! -regex '.*_test\.rego$' ! -path './plan/check-sanitized-value.rego' -print0 | xargs -0 -n1 opa check --strict
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install OPA
uses: open-policy-agent/setup-opa@v2
with:
version: 0.64.0
- name: Run unit tests
run: |
tests=$(find . -type f -name '*_test\.rego')
for test in $tests; do
opa test -v $test ${test/_test.rego/.rego}
done