add special exists function to check field presence #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/... |