Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions .github/workflows/vwa_frontend_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: VWA Frontend Tests
on:
pull_request:
paths:
- components/crud-web-apps/volumes/frontend/**
- releasing/version/VERSION
branches:
- main
- notebooks-v1
- 'v*-branch'

jobs:
frontend-format-linting-check:
name: Check code format and lint
runs-on: ubuntu-22.04
defaults:
run:
working-directory: components/crud-web-apps/volumes/frontend
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Check frontend formatting
run: npm run format:check
- name: Check frontend code linting
run: npm run lint-check

frontend-unit-tests:
runs-on: ubuntu-22.04
name: Unit tests
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node version to 16
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Kubeflow common library dependecies
run: |
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci
npm run build
npm link ./dist/kubeflow
- name: Install VWA dependencies
run: |
cd components/crud-web-apps/volumes/frontend
npm ci
npm link kubeflow
- name: Run unit tests
run: |
cd components/crud-web-apps/volumes/frontend
npm run test:prod
run-tests-in-chrome:
name: UI tests in chrome
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node version to 16
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Kubeflow common library dependecies
run: |
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci
npm run build
npm link ./dist/kubeflow
- name: Install VWA dependencies
run: |
cd components/crud-web-apps/volumes/frontend
npm ci
npm link kubeflow
- name: Serve UI & run Cypress tests in Chrome
uses: cypress-io/github-action@v6
with:
working-directory: components/crud-web-apps/volumes/frontend
start: npm run serve
install: false
browser: chrome
wait-on: "http://localhost:4200"

run-tests-in-firefox:
name: UI tests in firefox
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node version to 16
uses: actions/setup-node@v4
with:
node-version: 16

- name: Install Kubeflow common library dependecies
run: |
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm ci
npm run build
npm link ./dist/kubeflow

- name: Install VWA dependencies
run: |
cd components/crud-web-apps/volumes/frontend
npm ci
npm link kubeflow

- name: Serve UI & run Cypress tests in Firefox
uses: cypress-io/github-action@v6
with:
working-directory: components/crud-web-apps/volumes/frontend
start: npm run serve
install: false
browser: firefox
wait-on: "http://localhost:4200"
62 changes: 62 additions & 0 deletions .github/workflows/vwa_integration_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: VWA Integration Test
on:
pull_request:
paths:
- components/crud-web-apps/volumes/**
- components/crud-web-apps/common/**
- releasing/version/VERSION
branches:
- main
- notebooks-v1
- 'v*-branch'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true

env:
IMG: ghcr.io/kubeflow/notebooks/volumes-web-app
TAG: integration-test

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build VWA Image
run: |
cd components/crud-web-apps/volumes
make docker-build-multi-arch
- name: Install KinD
run: ./components/testing/gh-actions/install_kind.sh

- name: Create KinD Cluster
run: kind create cluster --config components/testing/gh-actions/kind-1-25.yaml

- name: Load Image into KinD Cluster
run: |
kind load docker-image "${IMG}:${TAG}"
- name: Install kustomize
run: ./components/testing/gh-actions/install_kustomize.sh

- name: Install Istio
run: ./components/testing/gh-actions/install_istio.sh

- name: Build & Apply manifests
run: |
cd components/crud-web-apps/volumes/manifests
kubectl create ns kubeflow
export CURRENT_IMAGE="${IMG}"
export PR_IMAGE="${IMG}:${TAG}"
# escape "." in the image names, as it is a special characters in sed
export CURRENT_IMAGE=$(echo "$CURRENT_IMAGE" | sed 's|\.|\\.|g')
export PR_IMAGE=$(echo "$PR_IMAGE" | sed 's|\.|\\.|g')
kustomize build overlays/istio \
| sed "s|${CURRENT_IMAGE}:[a-zA-Z0-9_.-]*|${PR_IMAGE}|g" \
| kubectl apply -f -
kubectl wait pods -n kubeflow -l app=volumes-web-app --for=condition=Ready --timeout=300s
40 changes: 40 additions & 0 deletions .github/workflows/vwa_multi_arch_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: VWA Multi-Arch Build Test
on:
pull_request:
paths:
- components/crud-web-apps/volumes/**
- components/crud-web-apps/common/**
- releasing/version/VERSION
branches:
- main
- notebooks-v1
- 'v*-branch'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true

env:
IMG: ghcr.io/kubeflow/notebooks/volumes-web-app
PLATFORMS: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build multi-arch images
uses: docker/build-push-action@v5
with:
context: components/crud-web-apps
file: components/crud-web-apps/volumes/Dockerfile
platforms: ${{ env.PLATFORMS }}
tags: ${{ env.IMG }}:${{ github.sha }}
Loading
Loading