-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (50 loc) · 1.35 KB
/
opa-tests.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: OPA Tests
on: [push]
jobs:
opa-unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
version: [latest, 0.60.x]
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup OPA
uses: open-policy-agent/setup-opa@v2
with:
version: ${{ matrix.version }}
- name: OPA unit tests
run: opa test -v examples/policy/
- name: OPA check strict
run: opa check --strict examples/policy/
opa-integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
version: [latest, 0.60.x]
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup OPA
uses: open-policy-agent/setup-opa@v2
with:
version: ${{ matrix.version }}
- name: Install pip dependencies
run: pip3 install -r test/requirements.txt
- name: OPA integration tests
run: test/integration.sh
regal-lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup OPA
uses: open-policy-agent/setup-opa@v2
- name: OPA check strict
run: opa check --strict .
- name: Setup Regal
uses: StyraInc/setup-regal@v1
with:
version: latest
- name: Regal Lint
run: regal lint --format github .