-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
46 lines (34 loc) · 1.17 KB
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import nox
from os import environ
def _setup(session):
session.run("python", "--version")
session.install("-r", "requirements.txt")
session.install("-r", "requirements.dev.txt")
# our tests assume that the cell toolbar is hidden
session.run(
"jupyter", "labextension", "disable", "@jupyterlab/cell-toolbar-extension"
)
# on github actions, we often get a timeout when
# installing the dependencies
session.run("jlpm", "config", "set", "httpTimeout", "600000")
session.run("jlpm", "install")
session.install("-e", ".")
session.run("python", "-c", "import ploomber_extension")
@nox.session(
python=environ.get("PYTHON_VERSION", "3.11"),
)
def test(session):
_setup(session)
# unit tests
session.run("pytest", "tests")
session.run("jlpm", "test")
@nox.session(
python=environ.get("PYTHON_VERSION", "3.11"),
)
def ui_test(session):
_setup(session)
with session.chdir("ui-tests"):
session.run("jlpm", "install")
# TODO: this will install all playwright browsers, but we only need one
session.run("jlpm", "playwright", "install")
session.run("jlpm", "test", *session.posargs)