Skip to content

Commit

Permalink
Add github actions file to run a simple test against kind
Browse files Browse the repository at this point in the history
Signed-off-by: rjsadow <richard.j.sadowski@gmail.com>
  • Loading branch information
rjsadow authored and dims committed Dec 21, 2023
1 parent 5825b98 commit 1f8d763
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test with Kind

on: [push, pull_request]

env:
KIND_VERSION: v0.20.0

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21

- name: Install kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${{ env.KIND_VERSION }}/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Create kind cluster
run: |
kind create cluster
- name: Set up kubectl
run: |
kubectl cluster-info --context kind-kind
kubectl get nodes
- name: Build and test
run: |
make build
make test
- name: Run a single focused test
run: |
bin/hydrophone --focus 'Simple pod should contain last line of the log'

0 comments on commit 1f8d763

Please sign in to comment.