-
Notifications
You must be signed in to change notification settings - Fork 66
feat: Migrate TWA test-related workflows #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: notebooks-v1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: TWA Frontend Tests | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - components/crud-web-apps/tensorboards/frontend/** | ||
| - releasing/version/VERSION | ||
| branches: | ||
| - main | ||
| - v*-branch | ||
| - notebooks-v1 | ||
|
|
||
| jobs: | ||
| frontend-format-linting-check: | ||
| name: Code format and lint | ||
| runs-on: ubuntu-22.04 | ||
| defaults: | ||
| run: | ||
| working-directory: components/crud-web-apps/tensorboards/frontend | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 16 | ||
|
|
||
| - name: Format tensorboards web app | ||
| run: | | ||
| npm ci | ||
| npm run format:check | ||
|
|
||
| - name: Lint tensorboards web app | ||
| run: | | ||
| npm ci | ||
| npm run lint-check | ||
|
|
||
| frontend-unit-tests: | ||
| runs-on: ubuntu-22.04 | ||
| name: Unit tests | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup node version to 16 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 16 | ||
|
|
||
| - name: Install common library dependencies | ||
| run: | | ||
| cd components/crud-web-apps/common/frontend/kubeflow-common-lib | ||
| npm ci | ||
| npm run build | ||
| npm link ./dist/kubeflow | ||
|
|
||
| - name: Install TWA dependencies | ||
| run: | | ||
| cd components/crud-web-apps/tensorboards/frontend | ||
| npm ci | ||
| npm link kubeflow | ||
|
|
||
| - name: Run unit tests | ||
| run: | | ||
| cd components/crud-web-apps/tensorboards/frontend | ||
| npm run test:prod | ||
|
|
||
| frontend-ui-tests: | ||
| name: UI tests with Cypress | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 16 | ||
|
|
||
| - name: Install common library dependencies | ||
| run: | | ||
| cd components/crud-web-apps/common/frontend/kubeflow-common-lib | ||
| npm ci | ||
| npm run build | ||
| npm link ./dist/kubeflow | ||
|
|
||
| - name: Install TWA dependencies | ||
| run: | | ||
| cd components/crud-web-apps/tensorboards/frontend | ||
| npm ci | ||
| npm link kubeflow | ||
|
|
||
| - name: Serve UI & run Cypress tests in Chrome and Firefox | ||
| run: | | ||
| cd components/crud-web-apps/tensorboards/frontend | ||
| npm run serve > serve.log 2>&1 & npx wait-on http://localhost:4200 | ||
| npm run ui-test-ci-all | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: TWA Integration Test | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - components/crud-web-apps/tensorboards/** | ||
| - components/crud-web-apps/common/** | ||
| - releasing/version/VERSION | ||
| branches: | ||
| - main | ||
| - v*-branch | ||
| - notebooks-v1 | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| IMG: ghcr.io/kubeflow/notebooks/tensorboards-web-app | ||
| TAG: integration-test | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build TWA Image | ||
| run: | | ||
| cd components/crud-web-apps/tensorboards | ||
| make docker-build | ||
|
|
||
| - name: Install KinD | ||
| run: ./components/testing/gh-actions/install_kind.sh | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While not directly related to changes introduced in this PR - given the AWS outage today - I am seeing issues trying to retrieve the It seems GitHub also hosts this binary and it available here:
And I have confirmed its presently accessible: Should There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this wondering depends on the answer to the question which of the two is more reliable in general? |
||
|
|
||
| - 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/tensorboards/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=tensorboards-web-app --for=condition=Ready --timeout=300s | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: TWA Multi-Arch Build Test | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - components/crud-web-apps/tensorboards/** | ||
| - components/crud-web-apps/common/** | ||
| - releasing/version/VERSION | ||
| branches: | ||
| - main | ||
| - v*-branch | ||
| - notebooks-v1 | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| IMG: ghcr.io/kubeflow/notebooks/tensorboards-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/tensorboards/Dockerfile | ||
| platforms: ${{ env.PLATFORMS }} | ||
| tags: ${{ env.IMG }}:${{ github.sha }} | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.