-
Notifications
You must be signed in to change notification settings - Fork 20
99 lines (79 loc) · 2.93 KB
/
run-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Tests
on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
env:
TIMEOUT: 15m
TYK_OSS_NS: tyk-oss
TYK_DATAPLANE_NS: tyk-dataplane
TYK_STACK_NS: tyk-stack
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
with:
version: v3.3.0
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml --all
smoke-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
k8s_version: ["v1.26.13", "v1.27.10","v1.28.6","v1.29.1"]
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Create Kind Cluster
uses: helm/[email protected]
with:
node_image: "kindest/node:${{ matrix.k8s_version }}"
- name: Install helm
uses: azure/setup-helm@v3
with:
version: v3.11.2
- name: Deploy Tyk OSS and Dependencies
run: |
kubectl create namespace tyk-oss
# Do not change the name
helm install redis simple-redis --repo 'https://helm.tyk.io/public/helm/charts/' -n tyk-oss --timeout ${{ env.TIMEOUT }}
helm dependency update ./tyk-oss
helm install tyk-oss ./tyk-oss -n tyk-oss --timeout ${{ env.TIMEOUT }}
- name: Upgrade Tyk OSS
run: |
helm upgrade -n tyk-oss tyk-oss ./tyk-oss --set tyk-gateway.gateway.kind=DaemonSet
- name: Uninstall Tyk OSS
run: |
helm uninstall tyk-oss -n tyk-oss --timeout ${{ env.TIMEOUT }}
kubectl delete namespace tyk-oss
- name: Deploy Tyk Data Plane
run: |
kubectl create namespace ${{ env. TYK_DATAPLANE_NS }}
# Do not change the name
helm install redis simple-redis --wait --repo 'https://helm.tyk.io/public/helm/charts/' -n ${{ env. TYK_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
helm dependency update ./tyk-data-plane
helm install --namespace ${{ env. TYK_DATAPLANE_NS }} tyk-data-plane ./tyk-data-plane --wait \
--set global.remoteControlPlane.orgId=${{ secrets.HYBRID_RPC_KEY }} \
--set global.remoteControlPlane.userApiKey=${{ secrets.HYBRID_API_KEY }} \
--set global.remoteControlPlane.connectionString=${{ secrets.HYBRID_MDCB_HOST }}
- name: Upgrade Tyk Data Plane
run: |
helm upgrade -n ${{ env. TYK_DATAPLANE_NS }} tyk-data-plane ./tyk-data-plane --set tyk-gateway.gateway.kind=DaemonSet
- name: Uninstall Tyk Data Plane
run: |
helm uninstall tyk-data-plane -n ${{ env. TYK_DATAPLANE_NS }} --timeout ${{ env.TIMEOUT }}
kubectl delete namespace ${{ env. TYK_DATAPLANE_NS }}