Periodic Conformance Tests with Kind #12
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: Periodic Conformance Tests with Kind | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */6 * * *" | |
env: | |
KIND_VERSION: v0.20.0 | |
K8S_VERSION: v1.29.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 with three nodes | |
run: | | |
cat <<EOF | kind create cluster --image kindest/node:${K8S_VERSION} --config=- | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
nodes: | |
- role: control-plane | |
- role: worker | |
- role: worker | |
EOF | |
- 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 full conformance test | |
run: | | |
bin/hydrophone --conformance \ | |
--output-dir ${{ github.workspace }}/results/ \ | |
--conformance-image registry.k8s.io/conformance:${K8S_VERSION} | |
- name: Archive conformance results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: conformance-results | |
path: ${{ github.workspace }}/results/ |