Skip to content

refactor: re-organize some common functions and variable references #31

refactor: re-organize some common functions and variable references

refactor: re-organize some common functions and variable references #31

Workflow file for this run

name: E2E
on:
push:
branches:
- main
pull_request:
jobs:
e2e-skopeo:
name: E2E using Skopeo
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Skopeo
run: |
sudo apt-get update && sudo apt-get install skopeo
skopeo --version
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
make install
- name: Start Kind Cluster
uses: helm/kind-action@v1
with:
cluster_name: kind
- name: Start distribution-registry
run: |
./e2e/deploy_distribution_registry.sh
- name: Run E2E tests
run: |
make test-e2e-skopeo
- name: Continue E2E by deploying KServe
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.yaml
e2e/repeat.sh kubectl apply --server-side -f https://github.com/kserve/kserve/releases/download/v0.14.0/kserve.yaml
e2e/repeat.sh kubectl apply --server-side -f https://github.com/kserve/kserve/releases/download/v0.14.0/kserve-cluster-resources.yaml
kubectl patch configmap/inferenceservice-config -n kserve --type=strategic -p '{"data": {"deploy": "{\"defaultDeploymentMode\": \"RawDeployment\"}"}}'
e2e/enable-modelcar.sh
- name: Load image in KinD for amd64
run: |
digest=$(skopeo inspect --tls-verify=false --raw docker://localhost:5001/nstestorg/modelcar | jq -r '.manifests[] | select(.platform.architecture == "amd64") | .digest')
skopeo copy --src-tls-verify=false docker://localhost:5001/nstestorg/modelcar@$digest docker-daemon:localhost:5001/nstestorg/modelcar:v1
kind load docker-image -n "kind" "localhost:5001/nstestorg/modelcar:v1"
- name: Apply Isvc using Modelcar # since the enable modelcar restart controller pod, better guard the kubectl apply
run: |
e2e/repeat.sh kubectl apply -f e2e/isvc-modelcar.yaml
kubectl wait --for=condition=Ready isvc/my-inference-service --timeout=240s
- name: Basic testing of Isvc that has Modelcar
run: |
echo "Starting port-forward..."
kubectl port-forward svc/my-inference-service-predictor 8080:80 &
PID=$!
sleep 2
echo "I have launched port-forward in background with: $PID."
echo "Check that OIP return the expected name"
curl -s http://localhost:8080/v2/models | jq -e '.models | index("my-inference-service") != null'
echo "Check that OIP produces an Inference Prediction"
curl -s -H "Content-Type: application/json" -d @e2e/data/input0.json http://localhost:8080/v2/models/my-inference-service/infer | jq
curl -s -H "Content-Type: application/json" -d @e2e/data/input1.json http://localhost:8080/v2/models/my-inference-service/infer | jq
curl -s -H "Content-Type: application/json" -d @e2e/data/input4.json http://localhost:8080/v2/models/my-inference-service/infer | jq
e2e-oras:
name: E2E using Oras CP
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install oras
uses: oras-project/setup-oras@v1
- run: oras version
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
make install
- name: Start Kind Cluster
uses: helm/kind-action@v1
with:
cluster_name: kind
- name: Start distribution-registry
run: |
./e2e/deploy_distribution_registry.sh
- name: Run E2E tests
run: |
make test-e2e-oras