From 7a19e4e77dc233dc931567b98fb1dcd59fc7b035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serta=C3=A7=20=C3=96zercan?= <852750+sozercan@users.noreply.github.com> Date: Mon, 4 Oct 2021 15:46:45 -0700 Subject: [PATCH] add gatekeeper test (#141) --- .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