Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tox_env: [py39, py310, py311, py312, py313, pypy3, pep8]
tox_env: [py39, py310, py311, py312, py313, pypy3]

# Use GitHub's Linux Docker host
runs-on: ubuntu-latest
Expand All @@ -32,23 +32,15 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install ruff
run: |
python3 -m pip install --break-system-packages ruff mypy
- name: Install tox
run: python -m pip install tox
- name: Run ruff format
run: |
ruff --version
if ! ruff format --check --quiet varlink
then
echo "Please run 'ruff format' on the above files or apply the diffs below manually"
ruff format --check --quiet --diff varlink
fi
tox -e ruff-format
- name: Run ruff check
run: |
ruff --version
ruff check varlink
tox -e ruff-check
- name: Type Checking (mypy)
run: |
python3 -m mypy --version
python3 -m mypy varlink/
tox -e mypy
runs-on: ubuntu-latest
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,46 @@ local_scheme = "no-local-version"
target-version = "py39"
line-length = 109
lint.select = ["E", "F", "I", "UP"]

[tool.mypy]
python_version = 3.9

### tox configuration ###
[tool.tox]
env_list = ["py313", "py312", "py311", "py310", "py39", "pypy3"]

[tool.tox.env_run_base]
description = "Run test suite on {base_python}"
deps = ["-r{toxinidir}/test-requirements.txt"]
commands = [
["pytest", "--cov=varlink", "--cov-report=term", "{posargs:varlink}"]
]

[tool.tox.env_run_base.set_env]
VIRTUAL_ENV="{envdir}"
BRANCH_NAME="master"
CLIENT_NAME="varlink"

[tool.tox.env.ruff-format]
description = "Check formatting using the ruff tool"
deps = ["ruff"]
commands = [
["ruff", "--version"],
["ruff", "format", "--quiet", "--check", "--diff", "{posargs:varlink}"]
]

[tool.tox.env.ruff-check]
description = "Run linting checks using the ruff tool"
deps = ["ruff"]
commands = [
["ruff", "--version"],
["ruff", "check", "{posargs:varlink}"]
]

[tool.tox.env.mypy]
description = "Run type checking tool mypy"
deps = ["mypy"]
commands = [
["mypy", "--version"],
["mypy", "{posargs:varlink}"]
]
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fixtures
nose2
pytest
pytest-cov
20 changes: 0 additions & 20 deletions tox.ini

This file was deleted.