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 05c7bfb
Show file tree
Hide file tree
Showing 4 changed files with 673 additions and 567 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.7', '3.8']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip install nox==2019.11.9
- run: pip install poetry==1.0.5
- run: nox
- run: pip install nox==2023.4.22
- run: pip install poetry==1.4.0
- run: nox -p ${{ matrix.python-version }}
8 changes: 5 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 05c7bfb

Please sign in to comment.