Skip to content

Commit

Permalink
First attempt to fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Mar 22, 2024
1 parent b27916c commit be8589e
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 11 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,25 @@ jobs:
jlpm
jlpm run lint:check
- name: Test the extension
- name: Test the packages
run: |
set -eux
jlpm run test
- name: Package the project
- name: Package the extension
working-directory: packages/jupyter-chat-extension
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyter_chat" jupyterlab
pip uninstall -y "jupyter_chat_extension" jupyterlab
- name: Upload project packages
uses: actions/upload-artifact@v3
with:
name: package-artifacts
path: dist/jupyter_chat*
path: packages/jupyter-chat-extension/dist/jupyter_chat_extension*
if-no-files-found: error

check_links:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/update-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ jobs:
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Install extension
run: |
set -eux
jlpm
python -m pip install .
run: ./scripts/install.sh

- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Playwright knows how to start JupyterLab server
start_server_script: 'null'
test_folder: ui-tests
test_folder: packages/jupyter-chat-extension/ui-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Example of [Jest](https://jestjs.io/docs/getting-started) unit tests
*/

describe('@jupyter/chat', () => {
it('should be tested', () => {
expect(1 + 1).toEqual(2);
});
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect, test } from '@jupyterlab/galata';
*/
test.use({ autoGoto: false });

test('should emit an activation console message', async ({ page }) => {
test('should be tested', async ({ page }) => {
// TODO: Add tests

expect(1).toBe(1);
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ test = [
"pytest-cov",
"pytest-jupyter[server]>=0.6.0"
]
dev = [
"hatch"
]

[tool.hatch.version]
source = "nodejs"
Expand Down
9 changes: 9 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# install core packages
pip install jupyterlab~=4.0
jlpm install
jlpm build

# install chat extension
pip install -e packages/jupyter-chat-extension[test]

0 comments on commit be8589e

Please sign in to comment.