Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests for dex plus restructuring and formatting #2815

Merged
merged 12 commits into from
Aug 1, 2024
Merged
16 changes: 8 additions & 8 deletions .github/workflows/admission_webhook_test.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build & Apply PodDefaults manifests in KinD
on:

Check warning on line 2 in .github/workflows/admission_webhook_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/admission_webhook_test.yaml
- apps/admission-webhook/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- .github/workflows/admission_webhook_test.yaml
- apps/admission-webhook/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**

jobs:
build:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/bentoml_test.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Build & Apply BentoML Yatai Stack manifests in KinD
on:

Check warning on line 2 in .github/workflows/bentoml_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/bentoml_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- contrib/bentoml/**
- .github/workflows/bentoml_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- contrib/bentoml/**

jobs:
build:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/centraldashboard_test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build & Apply CentralDashboard manifests in KinD
on:

Check warning on line 2 in .github/workflows/centraldashboard_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/centraldashboard_test.yaml
- apps/centraldashboard/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- .github/workflows/centraldashboard_test.yaml
- apps/centraldashboard/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh

jobs:
build:
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/dex_test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build & Apply Dex manifests in KinD
on:

Check warning on line 2 in .github/workflows/dex_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/dex_test.yaml
- common/dex/base/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- .github/workflows/dex_test.yaml
- common/dex/base/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh

jobs:
build:
Expand All @@ -33,3 +33,14 @@
cd common/dex
kustomize build overlays/istio | kubectl apply -f -
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 180s

- name: port forward
run: |
ingress_gateway_service=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${ingress_gateway_service} 8080:80 &
while ! curl localhost:8080; do echo waiting for port-forwarding; sleep 1; done; echo port-forwarding ready

- name: test dex login
run: |
pip3 install requests
./tests/gh-actions/test_dex_login.py
12 changes: 6 additions & 6 deletions .github/workflows/jupyter_web_application_test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build & Apply JWA manifests in KinD
on:

Check warning on line 2 in .github/workflows/jupyter_web_application_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/jupyter_web_application_test.yaml
- apps/jupyter/jupyter-web-app/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- .github/workflows/jupyter_web_application_test.yaml
- apps/jupyter/jupyter-web-app/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh

jobs:
build:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/katib_test.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build & Apply Katib manifests in KinD
on:

Check warning on line 2 in .github/workflows/katib_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/katib_test.yaml
- apps/katib/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- .github/workflows/katib_test.yaml
- apps/katib/upstream/**
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**

jobs:
build:
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/kserve_cni_test.yaml
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
name: Build & Apply KServe manifests in KinD, using istio CNI
on:

Check warning on line 2 in .github/workflows/kserve_cni_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

2:1 [truthy] truthy value should be one of [false, true]
pull_request:
paths:
- .github/workflows/kserve_cni_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- common/istio-cni-1-22/**
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- tests/gh-actions/install_knative-cni.sh
- common/knative/**
- tests/gh-actions/install_kserve.sh
- .github/workflows/kserve_cni_test.yaml
- tests/gh-actions/kind-cluster.yaml
- tests/gh-actions/install_kind.sh
- tests/gh-actions/install_kustomize.sh
- common/istio-cni-1-22/**
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- tests/gh-actions/install_knative-cni.sh
- common/knative/**
- tests/gh-actions/install_kserve.sh

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Install KinD
run: ./tests/gh-actions/install_kind.sh
- name: Install KinD
run: ./tests/gh-actions/install_kind.sh

- name: Create KinD Cluster
run: kind create cluster --config tests/gh-actions/kind-cluster.yaml
- name: Create KinD Cluster
run: kind create cluster --config tests/gh-actions/kind-cluster.yaml

- name: Install kustomize
run: ./tests/gh-actions/install_kustomize.sh
- name: Install kustomize
run: ./tests/gh-actions/install_kustomize.sh

- name: Create kubeflow namespace
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f -
- name: Create kubeflow namespace
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f -

- name: Install Istio CNI
run: ./tests/gh-actions/install_istio-cni.sh
- name: Install Istio CNI
run: ./tests/gh-actions/install_istio-cni.sh

- name: Install cert-manager
run: ./tests/gh-actions/install_cert_manager.sh
- name: Install cert-manager
run: ./tests/gh-actions/install_cert_manager.sh

- name: Install knative CNI
run: ./tests/gh-actions/install_knative-cni.sh
- name: Install knative CNI
run: ./tests/gh-actions/install_knative-cni.sh

- name: Build & Apply manifests
run: ./tests/gh-actions/install_kserve.sh
- name: Build & Apply manifests
run: ./tests/gh-actions/install_kserve.sh

- name: Create test namespace
run: kubectl create ns kserve-test
- name: Create test namespace
run: kubectl create ns kserve-test

- name: Setup python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Setup python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install test dependencies
run: pip install -r ./contrib/kserve/tests/requirements.txt
- name: Install test dependencies
run: pip install -r ./contrib/kserve/tests/requirements.txt

- name: Port forward
run: |
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80 &
- name: Port forward
run: |
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
nohup kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80 &

- name: Run kserve tests
run: |
export KSERVE_INGRESS_HOST_PORT=localhost:8080
cd ./contrib/kserve/tests && pytest .
- name: Run kserve tests
run: |
export KSERVE_INGRESS_HOST_PORT=localhost:8080
cd ./contrib/kserve/tests && pytest .

- name: Run kserve models webapp test
run: |
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app
- name: Run kserve models webapp test
run: |
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app
Loading
Loading