Skip to content

Commit

Permalink
fix: Update noxfile and dependencies
Browse files Browse the repository at this point in the history
Update dependencies, update minimal python version to 3.6.1
Fix noxfile, generate constraint file using constraint format add
`--without-hashes` option to be able to install dependencies, see:
python-poetry/poetry#3472 (comment)

Update python interpreter to test.
  • Loading branch information
boatx committed Aug 30, 2023
1 parent 08ab720 commit 0fc0993
Show file tree
Hide file tree
Showing 4 changed files with 671 additions and 565 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.7', '3.8', '3.9', '3.10']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 6 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import nox
from nox.sessions import Session

PYTHON_VERSIONS = ("3.8", "3.7", "3.6")
PYTHON_VERSIONS = ("3.10", "3.9", "3.8", "3.7", "3.6")
LOCATIONS = ("noxfile.py", "tests", "sockit")

nox.options.sessions = ("lint", "mypy", "pytype", "tests")
Expand All @@ -17,8 +17,10 @@ def install_with_constraints(
session.run(
"poetry",
"export",
"--dev",
"--format=requirements.txt",
"--with",
"dev",
"--without-hashes",
"--format=constraints.txt",
f"--output={requirements.name}",
external=True,
)
Expand All @@ -28,7 +30,7 @@ def install_with_constraints(
@nox.session(python=PYTHON_VERSIONS)
def tests(session: Session) -> None:
args = session.posargs or ["--cov"]
session.run("poetry", "install", "--no-dev", external=True)
session.run("poetry", "install", "--only", "main", external=True)
install_with_constraints(session, "coverage[toml]", "pytest", "pytest-cov")
session.run("pytest", *args)

Expand Down
Loading

0 comments on commit 0fc0993

Please sign in to comment.