Skip to content

Commit 4a9bfc8

Browse files
committed
Add GitHub Action workflow for running e2e tests
The e2e here uses kind. The eventual goal would be to remove the use of minikube completely and use kind exclusively in conformance to general Kubernetes upstream usage. - Add kind cluster configs for all supported Kubernetes versions - Add GH Action workflows for end to end testing Signed-off-by: Nabarun Pal <[email protected]>
1 parent 468419d commit 4a9bfc8

File tree

9 files changed

+248
-0
lines changed

9 files changed

+248
-0
lines changed

.github/workflows/e2e-master.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: End to End Tests - master
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [3.6, 3.7, 3.8, 3.9]
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- name: Create Kind Cluster
22+
uses: helm/[email protected]
23+
with:
24+
cluster_name: kubernetes-python-e2e-master-${{ matrix.python-version }}
25+
# The kind version to be used to spin the cluster up
26+
# this needs to be updated whenever a new Kind version is released
27+
version: v0.11.1
28+
# Update the config here whenever a new client snapshot is performed
29+
# This would eventually point to cluster with the latest Kubernetes version
30+
# as we sync with Kubernetes upstream
31+
config: .github/workflows/kind-configs/cluster-1.18.yaml
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/[email protected]
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -r requirements.txt
40+
python -m pip install -r test-requirements.txt
41+
- name: Install package
42+
run: python -m pip install -e .
43+
- name: Run End to End tests
44+
run: pytest -vvv -s kubernetes/e2e_test
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: End to End Tests - release-11.0
2+
3+
on:
4+
push:
5+
branches:
6+
- release-11.0
7+
pull_request:
8+
branches:
9+
- release-11.0
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- name: Create Kind Cluster
22+
uses: helm/[email protected]
23+
with:
24+
cluster_name: kubernetes-python-e2e-release-11.0-${{ matrix.python-version }}
25+
# The kind version to be used to spin the cluster up
26+
# this needs to be updated whenever a new Kind version is released
27+
version: v0.11.1
28+
# Update the config here whenever a new client snapshot is performed
29+
# This would eventually point to cluster with the latest Kubernetes version
30+
# as we sync with Kubernetes upstream
31+
config: .github/workflows/kind-configs/cluster-1.15.yaml
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/[email protected]
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -r requirements.txt
40+
python -m pip install -r test-requirements.txt
41+
- name: Install package
42+
run: python -m pip install -e .
43+
- name: Run End to End tests
44+
run: pytest -vvv -s kubernetes/e2e_test
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: End to End Tests - release-12.0
2+
3+
on:
4+
push:
5+
branches:
6+
- release-12.0
7+
pull_request:
8+
branches:
9+
- release-12.0
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- name: Create Kind Cluster
22+
uses: helm/[email protected]
23+
with:
24+
cluster_name: kubernetes-python-e2e-release-12.0-${{ matrix.python-version }}
25+
# The kind version to be used to spin the cluster up
26+
# this needs to be updated whenever a new Kind version is released
27+
version: v0.11.1
28+
# Update the config here whenever a new client snapshot is performed
29+
# This would eventually point to cluster with the latest Kubernetes version
30+
# as we sync with Kubernetes upstream
31+
config: .github/workflows/kind-configs/cluster-1.16.yaml
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/[email protected]
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -r requirements.txt
40+
python -m pip install -r test-requirements.txt
41+
- name: Install package
42+
run: python -m pip install -e .
43+
- name: Run End to End tests
44+
run: pytest -vvv -s kubernetes/e2e_test
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: End to End Tests - release-17.0
2+
3+
on:
4+
push:
5+
branches:
6+
- release-17.0
7+
pull_request:
8+
branches:
9+
- release-17.0
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- name: Create Kind Cluster
22+
uses: helm/[email protected]
23+
with:
24+
cluster_name: kubernetes-python-e2e-release-17.0-${{ matrix.python-version }}
25+
# The kind version to be used to spin the cluster up
26+
# this needs to be updated whenever a new Kind version is released
27+
version: v0.11.1
28+
# Update the config here whenever a new client snapshot is performed
29+
# This would eventually point to cluster with the latest Kubernetes version
30+
# as we sync with Kubernetes upstream
31+
config: .github/workflows/kind-configs/cluster-1.17.yaml
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/[email protected]
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -r requirements.txt
40+
python -m pip install -r test-requirements.txt
41+
- name: Install package
42+
run: python -m pip install -e .
43+
- name: Run End to End tests
44+
run: pytest -vvv -s kubernetes/e2e_test
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: End to End Tests - release-18.0
2+
3+
on:
4+
push:
5+
branches:
6+
- release-18.0
7+
pull_request:
8+
branches:
9+
- release-18.0
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [3.6, 3.7, 3.8, 3.9]
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- name: Create Kind Cluster
22+
uses: helm/[email protected]
23+
with:
24+
cluster_name: kubernetes-python-e2e-release-18.0-${{ matrix.python-version }}
25+
# The kind version to be used to spin the cluster up
26+
# this needs to be updated whenever a new Kind version is released
27+
version: v0.11.1
28+
# Update the config here whenever a new client snapshot is performed
29+
# This would eventually point to cluster with the latest Kubernetes version
30+
# as we sync with Kubernetes upstream
31+
config: .github/workflows/kind-configs/cluster-1.18.yaml
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/[email protected]
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install -r requirements.txt
40+
python -m pip install -r test-requirements.txt
41+
- name: Install package
42+
run: python -m pip install -e .
43+
- name: Run End to End tests
44+
run: pytest -vvv -s kubernetes/e2e_test
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
image: kindest/node:v1.15.12@sha256:b920920e1eda689d9936dfcf7332701e80be12566999152626b2c9d730397a95
6+
- role: worker
7+
image: kindest/node:v1.15.12@sha256:b920920e1eda689d9936dfcf7332701e80be12566999152626b2c9d730397a95
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
image: kindest/node:v1.16.15@sha256:83067ed51bf2a3395b24687094e283a7c7c865ccc12a8b1d7aa673ba0c5e8861
6+
- role: worker
7+
image: kindest/node:v1.16.15@sha256:83067ed51bf2a3395b24687094e283a7c7c865ccc12a8b1d7aa673ba0c5e8861
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
image: kindest/node:v1.17.17@sha256:66f1d0d91a88b8a001811e2f1054af60eef3b669a9a74f9b6db871f2f1eeed00
6+
- role: worker
7+
image: kindest/node:v1.17.17@sha256:66f1d0d91a88b8a001811e2f1054af60eef3b669a9a74f9b6db871f2f1eeed00
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
image: kindest/node:v1.18.19@sha256:7af1492e19b3192a79f606e43c35fb741e520d195f96399284515f077b3b622c
6+
- role: worker
7+
image: kindest/node:v1.18.19@sha256:7af1492e19b3192a79f606e43c35fb741e520d195f96399284515f077b3b622c

0 commit comments

Comments
 (0)