From d4288f9a5c255e413bd94de364b6e3f4ec5752c0 Mon Sep 17 00:00:00 2001 From: Simon Weald <7832341+glitchcrab@users.noreply.github.com> Date: Wed, 20 Mar 2024 20:26:52 +0000 Subject: [PATCH] feat(ci): test binary against kind cluster using github actions (#155) * feat(ci): test binary against kind cluster using github actions * change workflow approver * wait for deployment to be healthy * tidy up workflow --- .github/workflows/test_pr.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/test_pr.yaml b/.github/workflows/test_pr.yaml index f0e20b0..8428595 100644 --- a/.github/workflows/test_pr.yaml +++ b/.github/workflows/test_pr.yaml @@ -15,3 +15,24 @@ jobs: run: go build -o sonar - name: 'run built binary' run: ./sonar version + - name: 'wait for approval' + uses: trstringer/manual-approval@v1 + with: + secret: ${{ github.TOKEN }} + approvers: glitchcrab + minimum-approvals: 1 + issue-title: "Approval required for testing in KinD" + issue-body: "Please approve or deny creation of a KinD cluster for testing" + exclude-workflow-initiator-as-approver: false + - name: 'create kind cluster' + uses: helm/kind-action@v1 + with: + cluster_name: 'sonar-test' + - name: 'test deploying with sonar' + run: ./sonar create -n default -N ci-test -i glitchcrab/ubuntu-debug + - name: 'wait for deployment to start' + uses: jupyterhub/action-k8s-await-workloads@v3 + with: + workloads: "deploy/sonar-ci-test" + namespace: "default" + timeout: 60