From 61d7ac267e7c812ea0ec3c2bd69229f15bb8946b Mon Sep 17 00:00:00 2001 From: Ben Ebsworth Date: Tue, 10 Dec 2019 23:34:54 +1100 Subject: [PATCH] Create e2e.yml --- .github/workflows/e2e.yml | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..77f51b4 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,42 @@ +name: E2ETest +on: [pull_request] +jobs: + generate-policy: + name: Generate OPA policy + runs-on: [ubuntu-latest] + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-go@v1 + with: + go-version: 1.13 + - name: Install latest version of Kustomize + run: | + GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v3 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install 'jinja2-cli[yaml]' + integration-tests: + name: Create a Kind cluster + runs-on: [ubuntu-latest] + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-go@v1 + with: + go-version: 1.13 + - name: Install latest version of Kind + run: | + GO111MODULE=on go get sigs.k8s.io/kind + - name: Create Kind cluster + run: | + PATH=$(go env GOPATH)/bin:$PATH kind create cluster --config kind-config.yaml + - name: Run some sanity checks + # kubectl is already installed on the Github Ubuntu worker + run: | + kubectl get nodes -o wide + kubectl get pods --all-namespaces -o wide + kubectl get services --all-namespaces -o wide