Skip to content

Update infrastructure to use poetry. #5

Update infrastructure to use poetry.

Update infrastructure to use poetry. #5

Workflow file for this run

name: E2E Tests
on:
pull_request:
branches:
- '*'
jobs:
test:
runs-on:
- banzai-runner
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: "v1.22.17"
- name: Start a Kind cluster
uses: helm/[email protected]
with:
cluster_name: kind
version: "v0.19.0"
node_image: kindest/node:v1.22.17@sha256:9af784f45a584f6b28bce2af84c494d947a05bd709151466489008f80a9ce9d5
wait: "600s"
- name: Build docker image
run: |
docker build -t banzai-floyds:test-latest .
- name: Copy docker image to nodes
run: |
kind load docker-image banzai-floyds:test-latest
- name: Start banzai
run: |
# Deploy banzai stack
kubectl apply -f banzai_floyds/tests/e2e-k8s.yaml
POD=$(kubectl get pod -l app.kubernetes.io/name=banzai-floyds-e2e -o jsonpath="{.items[0].metadata.name}")
echo "POD=${POD}" >> $GITHUB_ENV
# Wait for banzai to be ready
kubectl wait --for=condition=Ready --timeout=60m pod/${POD}
- name: Test Order Identification
run: |
set +e
export START=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
kubectl exec $POD -c banzai-floyds-e2e-listener -- pytest -s --pyargs banzai_floyds --durations=0 -m detect_orders
EXIT_CODE=$?
# Always print logs even if (especially if?) the reduction fails
kubectl logs $POD -c banzai-floyds-e2e-listener --since-time=$START --prefix=true
kubectl logs $POD -c banzai-floyds-e2e-celery-workers --since-time=$START --prefix=true
# Exit with the captured status so the job properly fails or succeeds
exit $EXIT_CODE
- name: Test Wavelength Solution
run: |
set +e
export START=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
kubectl exec $POD -c banzai-floyds-e2e-listener -- pytest -s --pyargs banzai_floyds --durations=0 -m arc_frames
EXIT_CODE=$?
# Always print logs even if (especially if?) the reduction fails
kubectl logs $POD -c banzai-floyds-e2e-listener --since-time=$START --prefix=true
kubectl logs $POD -c banzai-floyds-e2e-celery-workers --since-time=$START --prefix=true
# Exit with the captured status so the job properly fails or succeeds
exit $EXIT_CODE
- name: Test Fringe Frame
run: |
set +e
export START=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
kubectl exec $POD -c banzai-floyds-e2e-listener -- pytest -s --pyargs banzai_floyds --durations=0 -m fringe
EXIT_CODE=$?
# Always print logs even if (especially if?) the reduction fails
kubectl logs $POD -c banzai-floyds-e2e-listener --since-time=$START --prefix=true
kubectl logs $POD -c banzai-floyds-e2e-celery-workers --since-time=$START --prefix=true
# Exit with the captured status so the job properly fails or succeeds
exit $EXIT_CODE
- name: Test Standards Creation
run: |
set +e
export START=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
kubectl exec $POD -c banzai-floyds-e2e-listener -- pytest -s --pyargs banzai_floyds --durations=0 -m standards
EXIT_CODE=$?
# Always print logs even if (especially if?) the reduction fails
kubectl logs $POD -c banzai-floyds-e2e-listener --since-time=$START --prefix=true
kubectl logs $POD -c banzai-floyds-e2e-celery-workers --since-time=$START --prefix=true
# Exit with the captured status so the job properly fails or succeeds
exit $EXIT_CODE
- name: Test Science Frame Creation
run: |
set +e
export START=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
kubectl exec $POD -c banzai-floyds-e2e-listener -- pytest -s --pyargs banzai_floyds --durations=0 -m science_frames
EXIT_CODE=$?
# Always print logs even if (especially if?) the reduction fails
kubectl logs $POD -c banzai-floyds-e2e-listener --since-time=$START --prefix=true
kubectl logs $POD -c banzai-floyds-e2e-celery-workers --since-time=$START --prefix=true
# Exit with the captured status so the job properly fails or succeeds
exit $EXIT_CODE
- name: Cleanup
run: |
kubectl delete service --selector=group=banzai-e2e-test
kubectl delete deployment --selector=group=banzai-e2e-test