Skip to content

Commit fe9e72f

Browse files
authored
Merge pull request #4 from boatx/fix/update-noxfile
fix: Update noxfile and dependencies
2 parents 08ab720 + d701846 commit fe9e72f

File tree

5 files changed

+738
-605
lines changed

5 files changed

+738
-605
lines changed

.github/workflows/tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: ['3.6', '3.7', '3.8']
9+
python-version: ['3.7', '3.8']
1010
name: Python ${{ matrix.python-version }}
1111
steps:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-python@v1
1414
with:
1515
python-version: ${{ matrix.python-version }}
1616
architecture: x64
17-
- run: pip install nox==2019.11.9
18-
- run: pip install poetry==1.0.5
19-
- run: nox
17+
- run: pip install nox==2023.4.22
18+
- run: pip install poetry==1.4.0
19+
- run: nox -p ${{ matrix.python-version }}

noxfile.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
import nox
55
from nox.sessions import Session
66

7-
PYTHON_VERSIONS = ("3.8", "3.7", "3.6")
7+
PYTHON_VERSIONS = ("3.8", "3.7")
88
LOCATIONS = ("noxfile.py", "tests", "sockit")
99

1010
nox.options.sessions = ("lint", "mypy", "pytype", "tests")
1111

1212

1313
def install_with_constraints(
14-
session: Session, *args: str, **kwargs: Any
14+
session: Session, *args: str, **kwargs: Any # noqa: ANN401
1515
) -> None:
1616
with tempfile.NamedTemporaryFile() as requirements:
1717
session.run(
1818
"poetry",
1919
"export",
20-
"--dev",
21-
"--format=requirements.txt",
20+
"--with",
21+
"dev",
22+
"--without-hashes",
23+
"--format=constraints.txt",
2224
f"--output={requirements.name}",
2325
external=True,
2426
)
@@ -28,7 +30,7 @@ def install_with_constraints(
2830
@nox.session(python=PYTHON_VERSIONS)
2931
def tests(session: Session) -> None:
3032
args = session.posargs or ["--cov"]
31-
session.run("poetry", "install", "--no-dev", external=True)
33+
session.run("poetry", "install", "--only", "main", external=True)
3234
install_with_constraints(session, "coverage[toml]", "pytest", "pytest-cov")
3335
session.run("pytest", *args)
3436

0 commit comments

Comments
 (0)