Skip to content

Commit

Permalink
Swap from tox to nox for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fkantelberg committed Dec 18, 2023
1 parent b53dd8d commit be312f1
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:

- name: Install build tools
run: |
python -m pip install --upgrade pip pre-commit setuptools tox
python -m pip install --upgrade pip pre-commit setuptools nox
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Run tox tests
- name: Run nox tests
run: |
tox
nox
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:

- name: Install build tools
run: |
python -m pip install --upgrade pip pre-commit setuptools tox twine wheel
python -m pip install --upgrade pip pre-commit setuptools nox twine wheel
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Run tox tests
- name: Run nox tests
run: |
tox
nox
- name: Build and publish Python package
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.log
.coverage
.mypy_cache
.nox
.pytest_cache
.tox/
__pycache__/
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ disable=raw-checker-failed,
attribute-defined-outside-init,

[IMPORTS]
ignored-modules=aiohttp,pytest,socket_proxy
ignored-modules=aiohttp,nox,pytest,socket_proxy
35 changes: 35 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import nox


@nox.session()
def clean(session):
session.install("coverage")
session.run("coverage", "erase")


@nox.session()
def py3(session):
session.install(
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-timeout",
"pytest-xdist",
"aiohttp",
"coverage",
)
session.run(
"pytest",
"--cov=src/socket_proxy",
"--cov-append",
"-n=4",
"--asyncio-mode=auto",
"--timeout=5",
)


@nox.session()
def report(session):
session.install("coverage")
session.run("coverage", "html")
session.run("coverage", "report", "--fail-under=80")
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = socket-proxy
version = attr: socket_proxy.VERSION
version = attr: socket_proxy.base.VERSION
author = Florian Kantelberg
author_email = [email protected]
description = Proxy TCP ports of local systems
Expand Down
28 changes: 0 additions & 28 deletions tox.ini

This file was deleted.

0 comments on commit be312f1

Please sign in to comment.