forked from facultyai/dash-bootstrap-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
35 lines (27 loc) · 776 Bytes
/
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
import nox
nox.options.sessions = ["lint", "test"]
SOURCES = [
"dash_bootstrap_components",
"docs",
"examples",
"tests",
"noxfile.py",
"tasks.py",
]
@nox.session()
def lint(session):
session.install("black", "flake8", "isort")
session.run("black", "--check", *SOURCES)
session.run("flake8", *SOURCES)
session.run("isort", "--check", *SOURCES)
@nox.session(name="format")
def format_(session):
session.install("black", "isort")
session.run("black", *SOURCES)
session.run("isort", *SOURCES)
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
def test(session):
session.install("pytest")
session.install("dash[testing]>=2.0.0")
session.install(".")
session.run("pytest", "--headless", "tests")