Skip to content

Commit b6b2e29

Browse files
authored
Fix jest configuration (#238)
* Update channel * Fix jest configuration * Test tl;dr on CI * Fix preview image link
1 parent 97aed63 commit b6b2e29

File tree

33 files changed

+46
-75
lines changed

33 files changed

+46
-75
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,23 @@ jobs:
103103
# - if: steps.filter.outputs.extension == 'true' && matrix.example == 'documents'
104104
# run: |
105105
# python -m pip install jupyter-collaboration
106-
- name: Install the NPM dependencies
106+
- name: Build the extension
107107
if: steps.filter.outputs.extension == 'true'
108-
run: jlpm
108+
run: |
109+
# Same commands as in TL;DR to ensure it works
110+
touch yarn.lock
111+
pip install -e . -v
112+
jupyter labextension develop . --overwrite
113+
shell: bash
109114
- name: Lint the files
110115
if: steps.filter.outputs.extension == 'true'
111-
run: jlpm run eslint:check
112-
- name: Build and check by extension
116+
run: jlpm run lint:check
117+
- name: Check extension installation
113118
if: steps.filter.outputs.extension == 'true'
114119
run: |
115-
pip install . -v
116120
jupyter labextension list 2>&1 | tee labextension.list
117121
cat labextension.list | grep -ie "@jupyterlab-examples/*.*OK"
118-
# There is a JavaScript warning as jupyter-collaboration is not
119-
# installed. And therefore @jupyter/docprovider is not available.
120122
python -m jupyterlab.browser_check
121-
shell: bash
122123
123124
- name: Install galata
124125
if: steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux')
@@ -217,7 +218,7 @@ jobs:
217218
- name: Install the Python dependencies
218219
if: steps.filter.outputs.extension == 'true'
219220
run: |
220-
python -m pip install --upgrade pip jupyterlab~=4.0.0 build twine hatch
221+
python -m pip install --upgrade pip jupyterlab~=4.0.0 build
221222
- name: Install the NPM dependencies
222223
if: steps.filter.outputs.extension == 'true'
223224
run: |
@@ -227,7 +228,7 @@ jobs:
227228
if: steps.filter.outputs.extension == 'true'
228229
run: |
229230
cd server-extension
230-
jlpm run eslint:check
231+
jlpm run lint:check
231232
- name: Build extension as user
232233
if: steps.filter.outputs.extension == 'true'
233234
# Force the usage of the source distribution (good practice)
@@ -340,9 +341,7 @@ jobs:
340341
run: jlpm
341342
- name: Build all the extensions
342343
run: |
344+
# Check embedded snippets
343345
jlpm lint:check
344-
jlpm run lerna exec --concurrency 4 -- "touch yarn.lock"
345-
# Needed to generate the _version.py files
346-
jlpm run lerna exec --concurrency 4 -- "pip install -e ."
347346
# Check links as last step as new tutorial may set links not yet valid (like file not yet in main)
348347
jlpm run lerna exec --concurrency 4 -- "pytest --check-links"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Use State persistence in an extension.
271271

272272
Add a new button to the notebook toolbar.
273273

274-
[![Toolbar button](toolbar-button/Preview.gif)](toolbar-button)
274+
[![Toolbar button](toolbar-button/preview.gif)](toolbar-button)
275275

276276
### [Widgets](widgets)
277277

codemirror-extension/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"prettier:check": "jlpm prettier:base --check",
5353
"stylelint": "jlpm stylelint:check --fix",
5454
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
55-
"test": "jest --coverage",
5655
"watch": "run-p watch:src watch:labextension",
5756
"watch:src": "tsc -w --sourceMap",
5857
"watch:labextension": "jupyter labextension watch ."

codemirror-extension/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

command-palette/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

commands/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

completer/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

contentheader/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

context-menu/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

custom-log-console/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"rootDir": "src",
1818
"strict": true,
1919
"strictNullChecks": true,
20-
"target": "ES2018",
21-
"types": ["jest"]
20+
"target": "ES2018"
2221
},
2322
"include": ["src/*"]
2423
}

0 commit comments

Comments
 (0)