feat(ci): test binary against kind cluster using github actions #135
Workflow file for this run
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: 'build binary' | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: 'Build binary and test' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'checkout' | |
uses: actions/checkout@v4 | |
- name: 'setup go' | |
uses: actions/setup-go@v5 | |
- name: 'build binary' | |
run: go build -o sonar | |
- name: 'run built binary' | |
run: ./sonar version | |
- 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 | |
- name: 'test deploying with sonar' | |
run: ./sonar create -n default -N kind-test -i glitchcrab/ubuntu-debug | |
- name: 'wait for deployment to start' | |
uses: jupyterhub/action-k8s-await-workloads@v3 | |
with: | |
workloads: "deploy/sonar-kind-test" | |
namespace: "default" | |
timeout: 60 | |
max-restarts: 0 |