-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (32 loc) · 990 Bytes
/
test.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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
submodules: 'recursive'
- name: Clone avmpolicytester
run: |
git clone https://github.com/lonegunmanb/avmpolicytester.git /tmp/avmpolicytester
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0
with:
go-version-file: /tmp/avmpolicytester/go.mod
- name: Install conftest
run: CGO_ENABLED=0 go install github.com/open-policy-agent/conftest@latest
- name: Run tests
run: |
export POLICY_DIR="$(pwd)/policy"
export UTILS_REGO="$(pwd)/policy/common"
cd /tmp/avmpolicytester
go test -v github.com/lonegunmanb/avmpolicytester/...