|
| 1 | +name: E2E |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +jobs: |
| 10 | + e2e: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - name: Checkout |
| 14 | + uses: actions/checkout@v6 |
| 15 | + with: |
| 16 | + fetch-depth: 0 |
| 17 | + |
| 18 | + - name: Set up Go |
| 19 | + uses: actions/setup-go@v6 |
| 20 | + with: |
| 21 | + go-version-file: go.mod |
| 22 | + |
| 23 | + - name: Create kind cluster |
| 24 | + uses: helm/kind-action@v1 |
| 25 | + with: |
| 26 | + config: tests/e2e/kind-config.yaml |
| 27 | + |
| 28 | + - name: Build images |
| 29 | + run: | |
| 30 | + LOCAL_TAG=$(git describe --always) |
| 31 | + docker build -t openvox-operator:${LOCAL_TAG} -f images/openvox-operator/Containerfile . |
| 32 | + docker build -t openvox-server:${LOCAL_TAG} -f images/openvox-server/Containerfile . |
| 33 | + docker build -t openvox-code:latest -f images/openvox-code/Containerfile . |
| 34 | + docker build -t openvox-agent:latest -f images/openvox-agent/Containerfile images/openvox-agent/ |
| 35 | + docker build -t openvox-mock:latest -f images/openvox-mock/Containerfile . |
| 36 | +
|
| 37 | + - name: Load images into kind |
| 38 | + run: | |
| 39 | + LOCAL_TAG=$(git describe --always) |
| 40 | + kind load docker-image openvox-operator:${LOCAL_TAG} |
| 41 | + kind load docker-image openvox-server:${LOCAL_TAG} |
| 42 | + kind load docker-image openvox-code:latest |
| 43 | + kind load docker-image openvox-agent:latest |
| 44 | + kind load docker-image openvox-mock:latest |
| 45 | +
|
| 46 | + - name: Install operator |
| 47 | + run: | |
| 48 | + LOCAL_TAG=$(git describe --always) |
| 49 | + helm upgrade --install openvox-operator charts/openvox-operator \ |
| 50 | + --namespace openvox-system --create-namespace \ |
| 51 | + --set image.repository=openvox-operator \ |
| 52 | + --set image.tag=${LOCAL_TAG} \ |
| 53 | + --set image.pullPolicy=Never |
| 54 | + kubectl wait --for=condition=Available deployment/openvox-operator \ |
| 55 | + -n openvox-system --timeout=2m |
| 56 | +
|
| 57 | + - name: Run E2E tests |
| 58 | + run: go tool chainsaw test tests/e2e/ |
| 59 | + |
| 60 | + - name: Collect debug info |
| 61 | + if: failure() |
| 62 | + run: | |
| 63 | + echo "=== Operator logs ===" |
| 64 | + kubectl logs -n openvox-system deploy/openvox-operator --tail=100 || true |
| 65 | + echo "=== All pods ===" |
| 66 | + kubectl get pods -A || true |
| 67 | + echo "=== Events ===" |
| 68 | + kubectl get events -A --sort-by=.lastTimestamp || true |
0 commit comments