-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnoxfile.py
43 lines (27 loc) · 829 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
36
37
38
39
40
41
42
43
"""Development automation"""
import nox
# nox.options.sessions = ["lint", "test", "doctest"]
nox.options.reuse_existing_virtualenvs = True
@nox.session()
def lint(session: nox.Session):
pass
@nox.session()
def mypy(session: nox.Session):
session.install("mypy", ".")
session.run("mypy")
@nox.session()
def format(session: nox.Session):
session.install("black")
session.run("black", ".", "--check")
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
def test(session: nox.Session):
session.install("-r", "tests/requirements.txt")
session.install(".")
session.run(
"pytest",
*session.posargs,
)
@nox.session()
def download_pip(session: nox.Session):
session.install("packaging", "gidgethub", "aiohttp")
session.run("python", "./scripts/download_pip.py")