Skip to content

Commit

Permalink
gh-actions(kwa): Add UI tests in test-node action
Browse files Browse the repository at this point in the history
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
  • Loading branch information
orfeas-k committed Jan 18, 2023
1 parent 2780114 commit b644959
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,35 @@ jobs:
run: |
cd pkg/new-ui/v1beta1/frontend
npm run test:prod
frontend-ui-tests:
name: UI tests with Cypress
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node version to 12
uses: actions/setup-node@v3
with:
node-version: 12

- name: Fetch Kubeflow and install common code dependencies
run: |
COMMIT=$(cat pkg/new-ui/v1beta1/frontend/COMMIT)
cd /tmp && git clone https://github.com/kubeflow/kubeflow.git
cd kubeflow
git checkout $COMMIT
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm i
npm run build
npm link ./dist/kubeflow
- name: Install KWA dependencies
run: |
cd pkg/new-ui/v1beta1/frontend
npm i
npm link kubeflow
- name: Serve UI & run Cypress tests in Chrome and Firefox
run: |
cd pkg/new-ui/v1beta1/frontend
npm run start & npx wait-on http://localhost:4200
npm run ui-test-ci-all
108 changes: 108 additions & 0 deletions pkg/new-ui/v1beta1/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/new-ui/v1beta1/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@
"prettier": "2.3.2",
"ts-node": "~7.0.0",
"typescript": "~4.3.5",
"wait-on": "^7.0.1"
}
}

0 comments on commit b644959

Please sign in to comment.