mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
chore: support targeting different Python versions with nox (#3214)
This commit is contained in:
parent
b3d18f382f
commit
fdac5fbf7c
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@ -68,8 +68,8 @@ nox -l
|
|||||||
# Run linters
|
# Run linters
|
||||||
nox -s lint
|
nox -s lint
|
||||||
|
|
||||||
# Run tests
|
# Run tests on Python 3.9
|
||||||
nox -s tests
|
nox -s tests-3.9
|
||||||
|
|
||||||
# Build and preview docs
|
# Build and preview docs
|
||||||
nox -s docs -- serve
|
nox -s docs -- serve
|
||||||
|
@ -2,6 +2,8 @@ import nox
|
|||||||
|
|
||||||
nox.options.sessions = ["lint", "tests", "tests_packaging"]
|
nox.options.sessions = ["lint", "tests", "tests_packaging"]
|
||||||
|
|
||||||
|
PYTHON_VERISONS = ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
|
||||||
|
|
||||||
|
|
||||||
@nox.session(reuse_venv=True)
|
@nox.session(reuse_venv=True)
|
||||||
def lint(session: nox.Session) -> None:
|
def lint(session: nox.Session) -> None:
|
||||||
@ -12,7 +14,7 @@ def lint(session: nox.Session) -> None:
|
|||||||
session.run("pre-commit", "run", "-a")
|
session.run("pre-commit", "run", "-a")
|
||||||
|
|
||||||
|
|
||||||
@nox.session
|
@nox.session(python=PYTHON_VERISONS)
|
||||||
def tests(session: nox.Session) -> None:
|
def tests(session: nox.Session) -> None:
|
||||||
"""
|
"""
|
||||||
Run the tests (requires a compiler).
|
Run the tests (requires a compiler).
|
||||||
|
Loading…
Reference in New Issue
Block a user