forked from RedHatInsights/insights-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
45 lines (29 loc) · 991 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
44
45
"""
Nox testing for Insights Core
=============================
To use this file install nox:
$ pip install --user --upgrade nox
Then you can run all nox tests:
$ nox
To run selected tests use `nox --list` to show the test names and then you can run
an individual test with:
$ nox -s test-2.7
See the nox documentation for more info:
https://nox.thea.codes/en/stable/index.html
If you need to install multiple Python versions and don't
want to install via RPM, check out Pyenv:
https://github.com/pyenv/pyenv
"""
import nox
@nox.session(python=["2.7", "3.6", "3.8", "3.9", "3.10", "3.11"])
def testing(session):
session.install('.[testing]')
session.run('pytest')
@nox.session(python=["3.8"])
def linting(session):
session.install('.[linting]')
session.run('flake8')
@nox.session(python=["3.8"])
def docs(session):
session.install('.[docs]')
session.run('sphinx-build', '-W', '-b', 'html', '-qa', '-E', 'docs', 'docs/_build/html')