-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update tox and github actions configs to handle multi-os test matrix
- Loading branch information
Showing
3 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,40 @@ | ||
[tox] | ||
min_version = 2.0 | ||
isolated_build = true | ||
envlist = py310, py311, lint | ||
envlist = py{310,311}-{linux,win32,darwin} | ||
skip_missing_interpreters = true | ||
|
||
[gh-actions] | ||
description = GH actions config | ||
python = | ||
3.10: py310 | ||
3.11: py311 | ||
|
||
[gh-actions:env] | ||
PLATFORM = | ||
ubuntu-latest: linux | ||
macos-latest: darwin | ||
windows-latest: win32 | ||
|
||
[testenv] | ||
description = Run tests & generate coverage report | ||
passenv = PYTHON_VERSION | ||
allowlist_externals = poetry, mypy | ||
commands = | ||
poetry install -v | ||
poetry run pytest tests --cov --cov-config=pyproject.toml --cov-report=xml | ||
poetry run coverage report -m | ||
poetry run mypy hitfactorpy | ||
|
||
[testenv:lint] | ||
allowlist_externals = black, flake8 | ||
platform = | ||
allowlist_externals = | ||
poetry | ||
python | ||
linux,darwin,win32: echo | ||
; deps = | ||
; linux: | ||
; darwin: | ||
; win32: | ||
commands_pre = | ||
python -c 'import sys; print("Setup tests for " + sys.platform)' | ||
linux: echo "Linux test setup" | ||
darwin: echo "MacOS test setup" | ||
win32: echo "Windows test setup" | ||
commands = | ||
black hitfactorpy tests | ||
flake8 hitfactorpy tests | ||
extras = | ||
lint | ||
linux,darwin,win32: | ||
poetry install -v | ||
poetry run pytest tests --cov --cov-config=pyproject.toml --cov-report=xml | ||
poetry run coverage report -m |