Skip to content

Commit 3c462a9

Browse files
ci: add centraldashboard tests (#97)
Signed-off-by: milinddethe15 <[email protected]>
1 parent 8a8f0df commit 3c462a9

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CentralDashboard Frontend Tests
2+
on:
3+
pull_request:
4+
paths:
5+
- components/centraldashboard/**
6+
- releasing/version/VERSION
7+
branches:
8+
- main
9+
- v*-branch
10+
11+
jobs:
12+
frontend-tests:
13+
runs-on: ubuntu-22.04
14+
name: Unit tests
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup node version to 16.20.2
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 16.20.2
23+
24+
- name: Setup Chrome
25+
uses: browser-actions/setup-chrome@v1
26+
with:
27+
chrome-version: stable
28+
29+
- name: Run frontend tests
30+
run: |
31+
cd components/centraldashboard
32+
npm install
33+
CHROMIUM_BIN=$(which chrome) npm run test
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CentralDashboard Integration Test
2+
on:
3+
pull_request:
4+
paths:
5+
- components/centraldashboard/**
6+
- releasing/version/VERSION
7+
branches:
8+
- main
9+
- v*-branch
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
13+
cancel-in-progress: true
14+
15+
env:
16+
IMG: ghcr.io/kubeflow/kubeflow/central-dashboard
17+
TAG: integration-test
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-22.04
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Build CentralDashboard Image
30+
run: |
31+
cd components/centraldashboard
32+
ARCH=linux/amd64 make docker-build-multi-arch
33+
34+
- name: Install KinD
35+
run: ./testing/gh-actions/install_kind.sh
36+
37+
- name: Create KinD Cluster
38+
run: kind create cluster --config testing/gh-actions/kind-1-25.yaml
39+
40+
- name: Load Images into KinD Cluster
41+
run: |
42+
kind load docker-image "${IMG}:${TAG}"
43+
44+
- name: Install kustomize
45+
run: ./testing/gh-actions/install_kustomize.sh
46+
47+
- name: Install Istio
48+
run: ./testing/gh-actions/install_istio.sh
49+
50+
- name: Build & Apply manifests
51+
run: |
52+
cd components/centraldashboard/manifests
53+
kubectl create ns kubeflow
54+
55+
export CURRENT_IMAGE="${IMG}"
56+
export PR_IMAGE="${IMG}:${TAG}"
57+
58+
# escape "." in the image names, as it is a special characters in sed
59+
export CURRENT_IMAGE=$(echo "$CURRENT_IMAGE" | sed 's|\.|\\.|g')
60+
export PR_IMAGE=$(echo "$PR_IMAGE" | sed 's|\.|\\.|g')
61+
62+
kustomize build overlays/kserve \
63+
| sed "s|${CURRENT_IMAGE}:[a-zA-Z0-9_.-]*|${PR_IMAGE}|g" \
64+
| kubectl apply -f -
65+
66+
kubectl wait pods -n kubeflow -l app=centraldashboard --for=condition=Ready --timeout=300s
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CentralDashboard Multi-Arch Build Test
2+
on:
3+
pull_request:
4+
paths:
5+
- components/centraldashboard/**
6+
- releasing/version/VERSION
7+
branches:
8+
- main
9+
- v*-branch
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
13+
cancel-in-progress: true
14+
15+
env:
16+
IMG: ghcr.io/kubeflow/kubeflow/central-dashboard
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-22.04
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup QEMU
26+
uses: docker/setup-qemu-action@v3
27+
28+
- name: Setup Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Build multi-arch Image
32+
run: |
33+
cd components/centraldashboard
34+
ARCH=linux/amd64 make docker-build-multi-arch
35+
ARCH=linux/ppc64le make docker-build-multi-arch
36+
ARCH=linux/arm64/v8 make docker-build-multi-arch

0 commit comments

Comments
 (0)