Tyk streams #287
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: Tyk Data Plane Tests | |
# Controls when the workflow will run | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
env: | |
MAX_ATTEMPTS: 3 | |
TIMEOUT: 30 | |
jobs: | |
tyk-dp: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
deployment: | |
- cert-manager | |
- datadog | |
- elasticsearch | |
- elasticsearch-kibana | |
- jaeger | |
- k6 | |
- keycloak | |
- keycloak-jwt | |
- newrelic | |
- opensearch | |
- operator | |
- operator-federation | |
- operator-graphql | |
- operator-httpbin | |
- operator-jwt-hmac | |
- operator-udg | |
- prometheus | |
- prometheus-grafana | |
- vault | |
steps: | |
- uses: actions/checkout@v4 | |
- name: start Minikube | |
uses: medyagh/setup-minikube@latest | |
with: | |
kubernetes-version: v1.23.13 | |
extra-config: 'kubelet.max-pods=100' | |
addons: 'default-storageclass,storage-provisioner,ingress' | |
start-args: '--force' | |
- name: Install helm | |
uses: Azure/setup-helm@v4 | |
- name: Install newman | |
run: | | |
sudo apt update && \ | |
sudo apt install nodejs npm -y && \ | |
npm install -g newman | |
- name: Copy .env file | |
run: cp .env.example .env | |
- name: Deploy tyk-dp-${{ matrix.deployment }} | |
uses: nick-invision/retry@v3 | |
with: | |
max_attempts: ${{ env.MAX_ATTEMPTS }} | |
timeout_minutes: ${{ env.TIMEOUT }} | |
command: | | |
TYK_WORKER_CONNECTIONSTRING="${{ secrets.TYK_WORKER_CONNECTIONSTRING }}" \ | |
TYK_WORKER_ORGID="${{ secrets.TYK_WORKER_ORGID }}" \ | |
TYK_WORKER_AUTHTOKEN="${{ secrets.TYK_WORKER_AUTHTOKEN }}" \ | |
TYK_WORKER_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_WORKER_OPERATOR_CONNECTIONSTRING }}" \ | |
OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \ | |
DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \ | |
DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \ | |
NEWRELIC_LICENSEKEY="${{ secrets.NEWRELIC_LICENSEKEY }}" \ | |
./up.sh -v \ | |
--redis redis \ | |
--namespace tyk-dp-${{ matrix.deployment }} \ | |
--deployments ${{ matrix.deployment }} \ | |
tyk-dp | |
- name: Sleep 1 minute | |
run: sleep 60 | |
- name: Test Tyk deployment | |
uses: nick-invision/retry@v3 | |
with: | |
max_attempts: ${{ env.MAX_ATTEMPTS }} | |
timeout_minutes: ${{ env.TIMEOUT }} | |
on_retry_command: | | |
TYK_WORKER_CONNECTIONSTRING="${{ secrets.TYK_WORKER_CONNECTIONSTRING }}" \ | |
TYK_WORKER_ORGID="${{ secrets.TYK_WORKER_ORGID }}" \ | |
TYK_WORKER_AUTHTOKEN="${{ secrets.TYK_WORKER_AUTHTOKEN }}" \ | |
TYK_WORKER_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_WORKER_OPERATOR_CONNECTIONSTRING }}" \ | |
OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \ | |
DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \ | |
DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \ | |
NEWRELIC_LICENSEKEY="${{ secrets.NEWRELIC_LICENSEKEY }}" \ | |
./up.sh -v \ | |
--redis redis \ | |
--namespace tyk-dp-${{ matrix.deployment }} \ | |
--deployments ${{ matrix.deployment }} \ | |
tyk-dp && sleep 180 | |
command: newman run --folder gateway --env-var "gateway.port=8081" --env-var "deployment=data-plane" tyk-k8s-demo.postman_collection.json | |
- name: Test ${{ matrix.deployment }} | |
uses: nick-invision/retry@v3 | |
with: | |
max_attempts: ${{ env.MAX_ATTEMPTS }} | |
timeout_minutes: ${{ env.TIMEOUT }} | |
on_retry_command: | | |
TYK_WORKER_CONNECTIONSTRING="${{ secrets.TYK_WORKER_CONNECTIONSTRING }}" \ | |
TYK_WORKER_ORGID="${{ secrets.TYK_WORKER_ORGID }}" \ | |
TYK_WORKER_AUTHTOKEN="${{ secrets.TYK_WORKER_AUTHTOKEN }}" \ | |
TYK_WORKER_OPERATOR_CONNECTIONSTRING="${{ secrets.TYK_WORKER_OPERATOR_CONNECTIONSTRING }}" \ | |
OPERATOR_LICENSE="${{ secrets.DASH_LICENSE }}" \ | |
DATADOG_APIKEY="${{ secrets.DATADOG_APIKEY }}" \ | |
DATADOG_APPKEY="${{ secrets.DATADOG_APPKEY }}" \ | |
NEWRELIC_LICENSEKEY="${{ secrets.NEWRELIC_LICENSEKEY }}" \ | |
./up.sh -v \ | |
--redis redis \ | |
--namespace tyk-dp-${{ matrix.deployment }} \ | |
--deployments ${{ matrix.deployment }} \ | |
tyk-dp && sleep 180 | |
command: newman run --folder ${{ matrix.deployment }} --insecure --env-var "gateway.port=8081" -n 1 tyk-k8s-demo.postman_collection.json | |
- name: Clean up | |
run: ./down.sh -v --namespace tyk-dp-${{ matrix.deployment }} |