This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
fix: Release fix #56
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 | |
permissions: | |
id-token: write | |
contents: read | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Start minikube | |
uses: manusa/[email protected] | |
id: minikube | |
with: | |
minikube version: "v1.33.0" | |
kubernetes version: "v1.30.0" | |
driver: docker | |
start args: --embed-certs --addons=ingress,metrics-server | |
- name: Install Istio | |
run: | | |
ISTIO_VERSION="1.23.0" | |
echo "Installing Istio ..." | |
mkdir istio_tmp | |
pushd istio_tmp >/dev/null | |
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=${ISTIO_VERSION} sh - | |
cd istio-${ISTIO_VERSION} | |
export PATH=$PWD/bin:$PATH | |
istioctl install --set profile=demo -y | |
popd | |
- name: Install Gateway API | |
run: | | |
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml | |
- name: Deploy the boutique demo | |
run: | | |
kubectl create namespace baseline | |
kubectl apply -f ci/obd-demo.yaml -n baseline | |
- name: Validate that the boutique demo is up and running | |
run: | | |
set -x | |
# Check that the four baseline service pods + gateway istio pod are running and ready | |
while [ $(kubectl get pods -n baseline --no-headers -o custom-columns=NAMESPACE:metadata.namespace,POD:metadata.name,PodIP:status.podIP,READY-true:status.containerStatuses[*].ready | grep "true" | wc -l) -ne 5 ] | |
do | |
echo "Waiting for baseline pods to run, iteration number $c..." | |
kubectl get pods -n baseline -o custom-columns=NAMESPACE:metadata.namespace,POD:metadata.name,PodIP:status.podIP,READY-true:status.containerStatuses[*].ready | |
((c++)) && ((c==12)) && exit 1 | |
sleep 10 | |
done | |
echo "All baseline pods are running and ready." | |
apps=$(kubectl get pods -n baseline -o jsonpath='{.items[*].metadata.labels.app\.kubernetes\.io/name}') | |
echo ${apps} | |
if [ "${apps}" != "cartservice frontend postgres productcatalogservice" ]; then exit 1; fi | |
- name: Run operator tests | |
run: | | |
make test |