feat: Add Knative integration for notifications #232
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| HELM_VERSION: v3.15.2 | |
| PGO_VERSION: 5.7.4 | |
| jobs: | |
| lint: | |
| name: Lint checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Install ajv-cli | |
| run: npm install -g ajv-cli ajv-formats | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: ${{ env.HELM_VERSION }} | |
| - name: Setup Helm dependencies | |
| run: ./scripts/deploy.sh setup | |
| - name: Run linters | |
| run: make lint | |
| - name: Validate Helm values schema | |
| run: make validate-schema | |
| helm-unit-tests: | |
| name: Helm Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: ${{ env.HELM_VERSION }} | |
| - name: Run Helm unit tests | |
| run: make tests | |
| - name: Run lint checks | |
| run: make lint | |
| - name: Validate Helm schemas | |
| run: make validate-schema | |
| integration-tests: | |
| name: Integration Tests (K3s) | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Wait for Helm tests to pass | |
| uses: lewagon/[email protected] | |
| if: github.event_name == 'pull_request' | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| check-name: 'Helm Unit Tests' | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| wait-interval: 30 | |
| - name: Start K3s cluster | |
| uses: jupyterhub/action-k3s-helm@v4 | |
| with: | |
| k3s-channel: latest | |
| helm-version: ${{ env.HELM_VERSION }} | |
| metrics-enabled: false | |
| docker-enabled: true | |
| - name: Set release name | |
| run: echo "RELEASE_NAME=eoapi-$(echo "${{ github.sha }}" | cut -c1-8)" >> "$GITHUB_ENV" | |
| - name: Wait for K3s readiness | |
| run: | | |
| echo "=== Waiting for K3s cluster to be ready ===" | |
| # The action already sets up kubectl context, just verify it works | |
| kubectl cluster-info | |
| kubectl get nodes | |
| # Wait for core components | |
| kubectl wait --for=condition=Ready pod -l k8s-app=kube-dns -n kube-system --timeout=300s | |
| kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=traefik -n kube-system --timeout=300s | |
| # Verify Traefik CRDs | |
| timeout=300; counter=0 | |
| for crd in "middlewares.traefik.io" "ingressroutes.traefik.io"; do | |
| while [ $counter -lt $timeout ] && ! kubectl get crd "$crd" &>/dev/null; do | |
| sleep 3; counter=$((counter + 3)) | |
| done | |
| [ $counter -ge $timeout ] && { echo "❌ Timeout waiting for $crd"; exit 1; } | |
| done | |
| echo "✅ K3s cluster ready" | |
| - name: Deploy eoAPI | |
| id: deploy | |
| run: | | |
| echo "=== eoAPI Deployment ===" | |
| export RELEASE_NAME="${RELEASE_NAME}" | |
| export PGO_VERSION="${{ env.PGO_VERSION }}" | |
| export CI_MODE=true | |
| # Deploy using consolidated script with CI mode | |
| ./scripts/deploy.sh --ci | |
| - name: Validate deployment | |
| run: | | |
| echo "=== Post-deployment validation ===" | |
| ./scripts/test.sh check-deployment | |
| - name: Run integration tests | |
| run: | | |
| export RELEASE_NAME="$RELEASE_NAME" | |
| ./scripts/test.sh integration --debug | |
| - name: Debug failed deployment | |
| if: failure() | |
| run: | | |
| ./scripts/debug-deployment.sh | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| helm uninstall "$RELEASE_NAME" -n eoapi || true | |
| kubectl delete namespace eoapi || true |