-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
28 lines (22 loc) · 804 Bytes
/
Copy pathnoxfile.py
File metadata and controls
28 lines (22 loc) · 804 Bytes
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
import nox
import nox_poetry.patch # noqa
from nox.sessions import Session
@nox.session(python=["3.6", "3.7", "3.8", "3.9"])
def tests(session: Session) -> None:
session.run("pip", "--version")
# session.run("pip", "install", "pip==20.2.4")
session.run("poetry", "lock")
session.install(".")
session.install("docker")
if session.python in ["3.6", "3.7"]:
session.install("aiounittest")
session.run("python", "-m", "unittest")
@nox.session(python="3.9")
def coverage(session: Session) -> None:
session.run("poetry", "lock")
session.install(".")
session.install("docker")
session.install("coverage[toml]")
session.install("codecov")
session.run("coverage", "run", "-m", "unittest", "discover")
session.run("codecov", *session.posargs)