Skip to content

Kind relations/inv/spicedb setup #72

Kind relations/inv/spicedb setup

Kind relations/inv/spicedb setup #72

Workflow file for this run

name: E2E Testing with Kind
on:
workflow_call:
pull_request:
branches: ['main']
jobs:
e2e-test:
name: E2E Test Inventory API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Inventory Up - Kind Cluster
run: make inventory-up-kind
- name: Monitor Pods in Kind
run: |
for i in {1..300}; do
STATUS=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].status.phase}')
if [ "$STATUS" = "Succeeded" ]; then
echo "Test pod completed successfully."
exit 0
elif [ "$STATUS" = "Failed" ]; then
echo "Test pod failed."
TEST_POD=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].metadata.name}')
kubectl logs $TEST_POD
exit 1
fi
sleep 1
done
echo "Timeout reached while waiting for the test pod to complete."
exit 1
- name: View Test Pod Logs
run: |
TEST_POD=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].metadata.name}')
kubectl logs $TEST_POD
- name: Inventory Down - Kind Cluster
run: make inventory-down-kind