-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathnoxfile.py
39 lines (26 loc) · 944 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
import os
import nox
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
PACKAGE = "abilian"
travis_python_version = os.environ.get("TRAVIS_PYTHON_VERSION")
if travis_python_version:
python = [travis_python_version]
else:
python = PYTHON_VERSIONS
nox.options.reuse_existing_virtualenvs = True
@nox.session(python="3.6")
def lint(session):
session.run("poetry", "install", "-q", external=True)
session.install("poetry", "psycopg2-binary")
session.run("make", "lint-ci", external=True)
@nox.session(python=python)
def pytest(session):
session.run("poetry", "install", "-q", external=True)
session.install("psycopg2-binary")
session.run("pip", "check")
session.run("pytest", "-q")
@nox.session(python="3.8")
def typeguard(session):
session.run("poetry", "install", "-q", external=True)
session.install("psycopg2-binary", "typeguard")
session.run("pytest", f"--typeguard-packages={PACKAGE}")