1
0
Fork 0
mirror of https://github.com/imjasonh/snoop synced 2026-07-16 12:11:53 +00:00
snoop/.github/workflows/kind-tests.yaml

64 lines
1.4 KiB
YAML

name: KinD Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
kind-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install KinD
run: |
# Install KinD
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Set up kubectl
uses: azure/setup-kubectl@v4
with:
version: "latest"
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Build Docker image
run: |
docker build -t snoop:ci-test .
- name: Set up KinD cluster
run: |
cd test/kind
./setup.sh snoop:ci-test
- name: Run KinD integration tests
run: |
cd test/kind
IMAGE_TAG=snoop:ci-test ./run-tests.sh
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: kind-test-results
path: test/kind/results/
retention-days: 7
- name: Clean up
if: always()
run: |
kind delete cluster --name snoop-test || true