Skip to content

Commit

Permalink
fix build (#6)
Browse files Browse the repository at this point in the history
* fix build and updates

* drop 3.11
skshetry authored Jun 30, 2022
1 parent ba39b7a commit 6e19835
Showing 6 changed files with 25 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: '3.10'
- run: pip install -U nox
- run: nox -s build
- uses: pypa/gh-action-pypi-publish@master
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ jobs:
python-version: ['3.7', '3.8', '3.9', '3.10']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install -U nox
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@ repos:
- id: black
language_version: python3
repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.6.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.3.0
hooks:
- id: check-toml
- id: check-yaml
12 changes: 8 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"""Automation using nox.
"""
import glob
import sys

import nox

nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = "lint", "tests", "tests-pytest5"
nox.options.sessions = "lint", "tests", "compat"
locations = "pytest_test_utils", "tests.py"


@@ -18,10 +19,11 @@ def tests(session: nox.Session) -> None:
session.run("coverage", "report", "--show-missing", "--skip-covered")


@nox.session(python=["3.7"], name="tests-pytest5")
def tests_pytest5(session: nox.Session) -> None:
@nox.session(python=["3.7", "3.8"])
@nox.parametrize("pytest", ["5", "6"])
def compat(session: nox.Session, pytest: str) -> None:
session.install(".[tests]")
session.install("pytest==5.0.0")
session.install(f"pytest=={pytest}")
session.run("coverage", "run", "-m", "pytest", "tests.py")


@@ -37,6 +39,8 @@ def lint(session: nox.Session) -> None:

session.run("pre-commit", "run", *args)
session.run("python", "-m", "mypy")
if sys.version_info >= (3, 11):
return
session.run("python", "-m", "pylint", *locations)


2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=48", "wheel"]
requires = ["setuptools>=48"]
build-backend = "setuptools.build_meta"

[tool.black]
13 changes: 8 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = pytest_test_utils
version = 0.0.7
long_description = file: README.md
long_description_content_type = text/markdown
license = Apache License 2.0
license_file = LICENSE
url = https://github.com/iterative/pytest-test-utils
@@ -13,6 +15,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Framework :: Pytest

[options]
@@ -24,13 +27,13 @@ install_requires=

[options.extras_require]
tests =
pytest==6.2.5
pytest-sugar==0.9.4
coverage==6.2
pytest==7
pytest-sugar
coverage==6
dev =
%(tests)s
pylint==2.11.1
mypy==0.910
pylint==2.14.3
mypy==0.961

[options.entry_points]
pytest11 =

0 comments on commit 6e19835

Please sign in to comment.