From 2061e87c2476e30d26973e3b430ea0811ff9054c Mon Sep 17 00:00:00 2001 From: Sertac Ozercan Date: Mon, 4 Oct 2021 22:24:26 +0000 Subject: [PATCH] add gatekeeper test Signed-off-by: Sertac Ozercan --- .github/workflows/gatekeeper.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/gatekeeper.yml diff --git a/.github/workflows/gatekeeper.yml b/.github/workflows/gatekeeper.yml new file mode 100644 index 000000000..a81bf40a2 --- /dev/null +++ b/.github/workflows/gatekeeper.yml @@ -0,0 +1,34 @@ +name: gatekeeper_test +on: [push, pull_request] + +jobs: + lint: + name: "Gatekeeper Test" + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Set up Go 1.17 + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + path: go/src/github.com/open-policy-agent/frameworks + + - name: Check out Gatekeeper default branch + uses: actions/checkout@v2 + with: + repository: open-policy-agent/gatekeeper + path: go/src/github.com/open-policy-agent/gatekeeper + + - name: Update Frameworks dependency in Gatekeeper + run: | + go mod edit -replace github.com/open-policy-agent/frameworks/constraint=${GITHUB_WORKSPACE}/go/src/github.com/open-policy-agent/frameworks/constraint + make vendor + working-directory: go/src/github.com/open-policy-agent/gatekeeper + + - name: Make test + run: make test + working-directory: go/src/github.com/open-policy-agent/gatekeeper