diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e2f13723e..59f4815b12 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,14 +48,34 @@ jobs: - name: Build the extension run: | pip install -e .[test] - jlpm install - jlpm run build - cd jupyterlab_widgets + + yarn install --frozen-lockfile + yarn run build + yarn run build:examples + + pushd jupyterlab_widgets pwd pip install -e . jupyter labextension develop . --overwrite jupyter labextension list - python -m jupyterlab.browser_check + popd - name: Run Python tests run: pytest . + - name: Run JS tests + run: | + pushd packages/base + yarn run test:unit:firefox:headless + popd + + pushd packages/controls + yarn run test:unit:firefox:headless + popd + + pushd packages/html-manager + yarn run test:unit:firefox:headless + popd + + pushd examples/web1 + yarn run test:firefox:headless + popd diff --git a/examples/web1/package.json b/examples/web1/package.json index d59b30b680..054c16cb06 100644 --- a/examples/web1/package.json +++ b/examples/web1/package.json @@ -12,7 +12,8 @@ "test": "npm run test:firefox && npm run test:chrome", "test:chrome": "npm run test:default", "test:default": "karma start karma.config.js --log-level debug", - "test:firefox": "npm run test:default -- --browsers Firefox" + "test:firefox": "npm run test:default -- --browsers Firefox", + "test:firefox:headless": "npm run test:default -- --browsers FirefoxHeadless" }, "dependencies": { "@jupyter-widgets/base": "^4.0.0", diff --git a/packages/base/package.json b/packages/base/package.json index 48814c6131..07b3ec4424 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -29,6 +29,7 @@ "test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome", "test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug", "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox", + "test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless", "test:unit:ie": "npm run test:unit:default -- --browsers=IE" }, "dependencies": { diff --git a/packages/controls/package.json b/packages/controls/package.json index b0e50f0c04..6c6c1dd0c6 100644 --- a/packages/controls/package.json +++ b/packages/controls/package.json @@ -31,6 +31,7 @@ "test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome", "test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug", "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox", + "test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless", "test:unit:ie": "npm run test:unit:default -- --browsers=IE" }, "dependencies": { diff --git a/packages/html-manager/package.json b/packages/html-manager/package.json index a6f3206708..3059863898 100644 --- a/packages/html-manager/package.json +++ b/packages/html-manager/package.json @@ -32,7 +32,8 @@ "test:unit": "npm run test:unit:firefox && npm run test:unit:chrome", "test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome", "test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug --browsers=Firefox", - "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox" + "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox", + "test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless" }, "dependencies": { "@jupyter-widgets/base": "^4.0.0",