ci: refactor pytests dev dependencies
This commit is contained in:
parent
e8f852bce7
commit
2a5dedcbb5
|
@ -36,7 +36,7 @@ jobs:
|
|||
run: pip install nox
|
||||
|
||||
- name: Run the benchmarks
|
||||
uses: CodSpeedHQ/action@v1
|
||||
uses: CodSpeedHQ/action@v2
|
||||
with:
|
||||
run: nox -s codspeed
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
|
|
@ -140,8 +140,7 @@ def codspeed(session: nox.Session) -> bool:
|
|||
_run_cargo(session, "codspeed", "run")
|
||||
# python benchmarks
|
||||
os.chdir(PYO3_DIR / "pytests")
|
||||
session.install("-r", "requirements-dev.txt", "pytest-codspeed")
|
||||
session.install(".")
|
||||
session.install(".[dev]", "pytest-codspeed")
|
||||
_run(session, "pytest", "--codspeed", external=True)
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ nox.options.sessions = ["test"]
|
|||
|
||||
@nox.session
|
||||
def test(session: nox.Session):
|
||||
session.install("-rrequirements-dev.txt")
|
||||
session.install(".[dev]")
|
||||
try:
|
||||
session.install("--only-binary=numpy", "numpy>=1.16")
|
||||
except CommandFailed:
|
||||
|
@ -19,6 +19,5 @@ def test(session: nox.Session):
|
|||
|
||||
@nox.session
|
||||
def bench(session: nox.Session):
|
||||
session.install("-rrequirements-dev.txt")
|
||||
session.install(".")
|
||||
session.install(".[dev]")
|
||||
session.run("pytest", "--benchmark-enable", "--benchmark-only", *session.posargs)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
from .pyo3_pytests import *
|
|
@ -17,3 +17,12 @@ classifiers = [
|
|||
"Operating System :: POSIX",
|
||||
"Operating System :: MacOS :: MacOS X",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"hypothesis>=3.55",
|
||||
"pytest-asyncio>=0.21",
|
||||
"pytest-benchmark>=3.4",
|
||||
"pytest>=6.0",
|
||||
"typing_extensions>=4.0.0"
|
||||
]
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
hypothesis>=3.55
|
||||
pytest>=6.0
|
||||
pytest-asyncio>=0.21
|
||||
pytest-benchmark>=3.4
|
||||
typing_extensions>=4.0.0
|
Loading…
Reference in New Issue