Smoke Tests #139
This file contains 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: Smoke Tests | |
on: | |
workflow_run: | |
workflows: | |
- Build and push image | |
types: | |
- completed | |
jobs: | |
on-success: | |
name: Smoke Tests | |
strategy: | |
matrix: | |
go-version: [1.20.x] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Set up Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Install jq | |
run: sudo apt-get install jq | |
- name: Install kind | |
run: go install sigs.k8s.io/[email protected] | |
- name: Create kind cluster | |
run: kind create cluster --name authorino-smoke-tests | |
- name: Install Authorino Operator | |
run: | | |
curl -sL https://raw.githubusercontent.com/Kuadrant/authorino-operator/main/utils/install.sh | bash -s | |
kubectl -n authorino-operator wait --timeout=300s --for=condition=Available deployments --all | |
- name: Create the namespace | |
run: | | |
kubectl create namespace authorino | |
- name: Create Authorino TLS certificates | |
run: | | |
curl -sSL https://raw.githubusercontent.com/Kuadrant/authorino/main/deploy/certs.yaml | sed "s/\$(AUTHORINO_INSTANCE)/authorino/g;s/\$(NAMESPACE)/authorino/g" | kubectl -n authorino apply -f - | |
- name: Create Authorino instance | |
run: | | |
kubectl -n authorino apply -f -<<EOF | |
apiVersion: operator.authorino.kuadrant.io/v1beta1 | |
kind: Authorino | |
metadata: | |
name: authorino | |
spec: | |
image: quay.io/kuadrant/authorino:latest | |
clusterWide: false | |
listener: | |
tls: | |
certSecretRef: | |
name: authorino-server-cert | |
oidcServer: | |
tls: | |
certSecretRef: | |
name: authorino-oidc-server-cert | |
logLevel: debug | |
logMode: production | |
EOF | |
- name: Deploy Talker API | |
run: kubectl -n authorino apply -f https://raw.githubusercontent.com/kuadrant/authorino-examples/main/talker-api/talker-api-deploy.yaml | |
- name: Deploy Envoy proxy | |
run: | | |
kubectl -n authorino apply -f https://raw.githubusercontent.com/kuadrant/authorino-examples/main/envoy/envoy-tls-deploy.yaml | |
- name: Deploy Keycloak | |
run: | | |
kubectl -n authorino apply -f https://raw.githubusercontent.com/kuadrant/authorino-examples/main/keycloak/keycloak-deploy.yaml | |
- name: Run e2e tests | |
env: | |
NAMESPACE: authorino | |
AUTHCONFIG: https://raw.githubusercontent.com/Kuadrant/authorino/main/tests/v1beta2/authconfig.yaml | |
AUTHCONFIG_INVALID: https://raw.githubusercontent.com/Kuadrant/authorino/main/tests/v1beta2/authconfig-invalid.yaml | |
run: | | |
curl -sSL https://raw.githubusercontent.com/Kuadrant/authorino/main/tests/e2e-test.sh | bash |