yoga/noxfile.py

38 lines
741 B
Python
Raw Normal View History

import nox
2021-03-29 13:46:56 +02:00
PYTHON_FILES = [
"yoga",
"test",
"setup.py",
"noxfile.py",
]
2021-04-06 15:58:23 +02:00
@nox.session(reuse_venv=True)
def lint(session):
2021-03-29 13:46:56 +02:00
session.install("flake8", "black")
session.run("flake8", *PYTHON_FILES)
2021-04-12 18:07:05 +02:00
session.run(
"black",
"--line-length=79",
"--check",
"--diff",
"--color",
*PYTHON_FILES,
)
2021-04-06 15:58:23 +02:00
@nox.session(python=["2.7", "3.7", "3.8", "3.9"], reuse_venv=True)
def test(session):
session.install("pytest")
session.install(".")
session.run("pytest", "-v", "test")
2021-01-18 15:25:50 +01:00
2021-04-06 15:58:23 +02:00
@nox.session(reuse_venv=True)
2021-01-18 15:25:50 +01:00
def gendoc(session):
session.install("sphinx", "sphinx-rtd-theme")
session.install(".")
2021-01-18 15:25:50 +01:00
session.run("sphinx-build", "-M", "html", "doc", "build")