Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 1f0f93c

Browse files
authored
Merge pull request #4768 from nojnhuh/ci
ref(e2e): move k8s version test config to CI
2 parents 7ddd4d1 + 5ec3e75 commit 1f0f93c

File tree

2 files changed

+27
-155
lines changed

2 files changed

+27
-155
lines changed

.github/workflows/main.yml

+27-33
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,16 @@ jobs:
202202
needs: build
203203
strategy:
204204
matrix:
205+
k8s_version: [""]
206+
focus: [""]
205207
bucket: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
208+
include:
209+
- k8s_version: v1.21.10
210+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
211+
bucket: ".*"
212+
- k8s_version: v1.22.7
213+
focus: "Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
214+
bucket: ".*"
206215
env:
207216
CTR_TAG: ${{ github.sha }}
208217
CTR_REGISTRY: "localhost:5000" # unused for kind, but currently required in framework
@@ -229,46 +238,31 @@ jobs:
229238
env:
230239
DOCKER_BUILDX_OUTPUT: type=docker
231240
run: make docker-build-osm build-osm docker-build-tcp-echo-server
232-
# PR Tests
233-
- name: Run PR tests
234-
id: pr_test
235-
if: ${{ github.event_name == 'pull_request' }}
241+
- name: Run tests
242+
id: test
236243
env:
237244
K8S_NAMESPACE: "osm-system"
238-
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
245+
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
239246
continue-on-error: true
240-
- name: Upload PR test logs
241-
if: ${{ steps.pr_test.conclusion != 'skipped' }}
242-
uses: actions/upload-artifact@v2
243-
with:
244-
name: pr_test_logs_bucket_${{ matrix.bucket }}
245-
path: /tmp/test**/*
246-
- name: Check continue PR tests
247-
if: ${{ steps.pr_test.conclusion != 'skipped' && steps.pr_test.outcome == 'failure'}}
248-
run: exit 1
249-
- name: Clean PR tests
250-
if: ${{ steps.pr_test.conclusion != 'skipped' }}
251-
run: rm -rf /tmp/test*
252-
253-
# Push Tests
254-
- name: Run Push tests
255-
id: push_test
256-
if: ${{ github.event_name == 'push' }}
257-
env:
258-
K8S_NAMESPACE: "osm-system"
259-
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
260-
continue-on-error: true
261-
- name: Upload Push test logs
262-
if: ${{ steps.push_test.conclusion != 'skipped' }}
247+
- name: Set Logs name
248+
if: ${{ steps.test.conclusion != 'skipped' }}
249+
run: |
250+
if [[ -n "${{ matrix.k8s_version }}" ]]; then
251+
echo "ARTIFACT_NAME=test_logs_k8s_version_${{ matrix.k8s_version }}" >> $GITHUB_ENV
252+
else
253+
echo "ARTIFACT_NAME=test_logs_bucket_${{ matrix.bucket }}" >> $GITHUB_ENV
254+
fi
255+
- name: Upload test logs
256+
if: ${{ steps.test.conclusion != 'skipped' }}
263257
uses: actions/upload-artifact@v2
264258
with:
265-
name: push_test_logs_bucket_${{ matrix.bucket }}
259+
name: ${{ env.ARTIFACT_NAME }}
266260
path: /tmp/test**/*
267-
- name: Check continue Push tests
268-
if: ${{ steps.push_test.conclusion != 'skipped' && steps.push_test.outcome == 'failure'}}
261+
- name: Check continue tests
262+
if: ${{ steps.test.conclusion != 'skipped' && steps.test.outcome == 'failure'}}
269263
run: exit 1
270-
- name: Clean Push tests logs
271-
if: ${{ steps.push_test.conclusion != 'skipped' }}
264+
- name: Clean tests
265+
if: ${{ steps.test.conclusion != 'skipped' }}
272266
run: rm -rf /tmp/test*
273267

274268
integration-tresor:

tests/e2e/e2e_k8s_version_test.go

-122
This file was deleted.

0 commit comments

Comments
 (0)