-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (35 loc) · 901 Bytes
/
opa.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Open Policy Agent Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Download OPA Binary
if: startsWith(matrix.os, 'macOS')
run: |
curl -L -o opa https://openpolicyagent.org/downloads/latest/opa_darwin_amd64
chmod +x opa
./opa -h
- name: Download OPA Binary
if: startsWith(matrix.os, 'ubuntu')
run: |
curl -L -o opa https://openpolicyagent.org/downloads/latest/opa_linux_amd64
chmod +x opa
./opa -h
- name: Run Testing
run: |
./opa test -v policy/*.rego