Skip to content

Commit

Permalink
web-apps(front): Make the library tests run in CI (kubeflow/kubeflow#…
Browse files Browse the repository at this point in the history
…5564)

In order for the frontend tests to run in a CI system, which will be
using a container to run them, we will need to make some adjustments.

Namely, we will need to:
* Run a headless version of Chrome
* Run the `ng test` in non-watch mode, in order for the testing process
  to terminate and not watch for changes to the codebase.

Signed-off-by: Kimonas Sotirchos <[email protected]>
  • Loading branch information
kimwnasptd authored and Adembc committed Jun 22, 2024
1 parent 4d80845 commit 5111dee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "ng serve",
"build": "ng build && npm run copyCSS && npm run copyAssets",
"test": "ng test",
"test-ci": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI",
"lint": "ng lint",
"e2e": "ng e2e",
"copyCSS": "cp ./projects/kubeflow/src/kubeflow.css ./dist/kubeflow && cp ./projects/kubeflow/src/styles.scss ./dist/kubeflow && cp ./projects/kubeflow/src/lib/variables.scss ./dist/kubeflow/lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ module.exports = function(config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
},
singleRun: false,
restartOnFileChange: true,
});
Expand Down

0 comments on commit 5111dee

Please sign in to comment.