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: Tests to ensure that changes to charts do not break user experience | |
on: | |
pull_request: | |
branches: | |
- master | |
# Kind versions used to test Iter8 on different versions of Kubernetes | |
# From: https://github.com/kubernetes-sigs/kind/releases | |
env: | |
versions: | | |
kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f | |
kindest/node:v1.25.8@sha256:00d3f5314cc35327706776e95b2f8e504198ce59ac545d0200a89e69fce10b7f | |
kindest/node:v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16 | |
kindest/node:v1.23.17@sha256:e5fd1d9cd7a9a50939f9c005684df5a6d145e8d695e78463637b79464292e66c | |
kindest/node:v1.22.17@sha256:c8a828709a53c25cbdc0790c8afe12f25538617c7be879083248981945c38693 | |
kindest/node:v1.21.14@sha256:27ef72ea623ee879a25fe6f9982690a3e370c68286f4356bf643467c552a3888 | |
kindest/node:v1.27.1@sha256:9915f5629ef4d29f35b478e819249e89cfaffcbfeebda4324e5c01d53d937b09 | |
kindest/node:v1.27.0@sha256:c6b22e613523b1af67d4bc8a0c38a4c3ea3a2b8fbc5b367ae36345c9cb844518 | |
jobs: | |
# Get the different Kind versions | |
get_versions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the different Kind versions | |
id: set-matrix | |
run: | | |
# Serialize versions into JSON array | |
jsonVersions=$(jq -ncR '[inputs]' <<< "$versions") | |
echo $jsonVersions | |
# Output serialized jsonVersions | |
echo "matrix=$jsonVersions" | sed -e "s/,\"\"//" >> $GITHUB_OUTPUT | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
http-experiment: | |
name: HTTP load test | |
needs: get_versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.get_versions.outputs.matrix) }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get modified files in the charts/iter8 folder | |
id: modified-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/iter8 | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
- name: Start kind cluster ${{ matrix.version }} | |
uses: helm/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
with: | |
wait: 300s | |
node_image: ${{ matrix.version }} | |
- name: Create app | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
kubectl create deployment httpbin --image=kennethreitz/httpbin | |
kubectl expose deployment httpbin --type=ClusterIP --port=80 | |
kubectl wait --for=condition=available --timeout=60s deploy/httpbin | |
- name: iter8 k launch | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
iter8 k launch \ | |
--localChart \ | |
--chartName charts/iter8 \ | |
--set tasks={http} \ | |
--set http.url="http://httpbin.default/get" \ | |
--set runner=job | |
- name: Try other iter8 k commands | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
iter8 k assert -c completed -c nofailure --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
http-looped-experiment: | |
name: HTTP looped load test | |
needs: get_versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.get_versions.outputs.matrix) }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get modified files in the charts/iter8 folder | |
id: modified-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/iter8 | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
- name: Start kind cluster ${{ matrix.version }} | |
uses: helm/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
with: | |
wait: 300s | |
node_image: ${{ matrix.version }} | |
- name: Create app | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
kubectl create deployment httpbin --image=kennethreitz/httpbin | |
kubectl expose deployment httpbin --type=ClusterIP --port=80 | |
kubectl wait --for=condition=available --timeout=60s deploy/httpbin | |
- name: iter8 k launch | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
iter8 k launch \ | |
--localChart \ | |
--chartName charts/iter8 \ | |
--set tasks={http} \ | |
--set http.url="http://httpbin.default/get" \ | |
--set runner=cronjob \ | |
--set cronjobSchedule="*/1 * * * *" | |
- name: Try other iter8 k commands | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
sleep 120 | |
iter8 k assert -c nofailure --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
grpc-experiment: | |
name: gRPC load test | |
needs: get_versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.get_versions.outputs.matrix) }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get modified files in the charts/iter8 folder | |
id: modified-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/iter8 | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
- name: Start kind cluster ${{ matrix.version }} | |
uses: helm/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
with: | |
wait: 300s | |
node_image: ${{ matrix.version }} | |
- name: Create app | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051 | |
kubectl expose deploy hello --port=50051 | |
kubectl wait --for=condition=available --timeout=60s deploy/hello | |
- name: iter8 k launch | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
iter8 k launch \ | |
--localChart \ | |
--chartName charts/iter8 \ | |
--set tasks={grpc} \ | |
--set grpc.host="hello.default:50051" \ | |
--set grpc.call="helloworld.Greeter.SayHello" \ | |
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \ | |
--set runner=job | |
- name: Try other iter8 k commands | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
iter8 k assert -c completed -c nofailure --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
grpc-looped-experiment: | |
name: gRPC looped load test | |
needs: get_versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.get_versions.outputs.matrix) }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get modified files in the charts/iter8 folder | |
id: modified-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/iter8 | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
- name: Start kind cluster ${{ matrix.version }} | |
uses: helm/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
with: | |
wait: 300s | |
node_image: ${{ matrix.version }} | |
- name: Create app | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051 | |
kubectl expose deploy hello --port=50051 | |
kubectl wait --for=condition=available --timeout=60s deploy/hello | |
- name: iter8 k launch | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
iter8 k launch \ | |
--localChart \ | |
--chartName charts/iter8 \ | |
--set tasks={grpc} \ | |
--set grpc.host="hello.default:50051" \ | |
--set grpc.call="helloworld.Greeter.SayHello" \ | |
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \ | |
--set runner=cronjob \ | |
--set cronjobSchedule="*/1 * * * *" | |
- name: Try other iter8 k commands | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
sleep 120 | |
iter8 k assert -c nofailure --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
autox: | |
name: AutoX test | |
needs: get_versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.get_versions.outputs.matrix) }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get modified files in the charts/autox folder | |
id: modified-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/autox | |
- name: Start kind cluster ${{ matrix.version }} | |
uses: helm/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
with: | |
wait: 300s | |
node_image: ${{ matrix.version }} | |
- name: Create namespace | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
kubectl create namespace argocd | |
- name: Start AutoX controller | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
helm install autox charts/autox \ | |
--set 'groups.httpbin.trigger.name=httpbin' \ | |
--set 'groups.httpbin.trigger.namespace=default' \ | |
--set 'groups.httpbin.trigger.group=apps' \ | |
--set 'groups.httpbin.trigger.version=v1' \ | |
--set 'groups.httpbin.trigger.resource=deployments' \ | |
--set 'groups.httpbin.specs.iter8.name=iter8' \ | |
--set 'groups.httpbin.specs.iter8.values.tasks={ready,http,assess}' \ | |
--set 'groups.httpbin.specs.iter8.values.ready.deploy=httpbin' \ | |
--set 'groups.httpbin.specs.iter8.values.ready.service=httpbin' \ | |
--set 'groups.httpbin.specs.iter8.values.ready.timeout=60s' \ | |
--set 'groups.httpbin.specs.iter8.values.http.url=http://httpbin.default/get' \ | |
--set 'groups.httpbin.specs.iter8.values.assess.SLOs.upper.http/error-count=0' \ | |
--set 'groups.httpbin.specs.iter8.values.assess.SLOs.upper.http/latency-mean=50' \ | |
--set 'groups.httpbin.specs.iter8.version=0.15.0' \ | |
--set 'groups.httpbin.specs.iter8.values.runner=job' | |
- name: Check AutoX controller | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: kubectl wait --for=condition=available --timeout=60s deploy/autox -n argocd | |
traffic: | |
name: Traffic test | |
needs: get_versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ${{ fromJson(needs.get_versions.outputs.matrix) }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get modified files in the charts/traffic folder | |
id: modified-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: charts/traffic | |
- name: Start kind cluster ${{ matrix.version }} | |
uses: helm/[email protected] | |
if: steps.modified-files.outputs.any_modified == 'true' | |
with: | |
wait: 300s | |
node_image: ${{ matrix.version }} | |
- name: Start traffic | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
helm install traffic charts/traffic -f charts/traffic/testdata/values.yaml | |
- name: Check traffic | |
if: steps.modified-files.outputs.any_modified == 'true' | |
run: | | |
kubectl rollout status --watch --timeout=60s statefulset.apps/traffic |