Skip to content

Commit

Permalink
run test_full and show results, separately from tox
Browse files Browse the repository at this point in the history
- also small fixes
  • Loading branch information
tomhea committed Dec 11, 2023
1 parent 7573541 commit b79b7cd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Tests

on: pull_request

env:
COLUMNS: 120

jobs:
test_all_versions:
test_py_os_variations:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -20,5 +23,27 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
- name: Test with tox py${{ matrix.python-version }}-${{ matrix.os }}
run: tox -v

test_full:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[tests]
- name: Test pytest
run: |
pytest --compile -n auto --all --junitxml=./compile-test-results.xml
pytest --run -n auto --all --junitxml=./run-test-results.xml
- name: Show tests results
if: always()
uses: pmeier/pytest-results-action@main
with:
path: ./*-test-results.xml
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@ plotly = { version = "^5.16.1", optional = true }
pytest = { version = "^7.4.0", optional = true }
pytest-ordering = { version = "^0.6", optional = true }
pytest-xdist = { version = "^3.3.1", optional = true }
pytest-cov = { version = "^4.1.0", optional = true }
mypy = { version = "^1.7.1", optional = true }
flake8 = { version = "^6.1.0", optional = true }
tox = { version = "^4.11.4", optional = true }

[tool.poetry.extras]
tests = [
"pytest", "pytest-ordering", "pytest-xdist", "pytest-cov",
"mypy", "flake8", "tox", "python381",
"pytest", "pytest-ordering", "pytest-xdist",
"mypy", "flake8", "tox"
]
stats = ["plotly"]
#docs = [sphinx, sphinx_rtd_theme]
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ env_list = py38, py39, py310, py311, py312,
isolated_build = true

[gh-actions]
;Notice that in gh-actions we don't run the full_tests via tox.
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312 mypy flake8 full_tests
3.12: py312, mypy, flake8

[testenv]
setenv = PYTHONPATH = {toxinidir}
deps = .[tests]
commands = pytest --fast --medium

[testenv:mypy]
python = py312
basepython = python3.12
commands = mypy flipjump

[testenv:full_tests]
python = py312
platform = windows-latest: windows
basepython = python3.12
commands =
pytest --compile -n auto --all
pytest --run -n auto --all

[testenv:flake8]
python = py312
basepython = python3.12
commands = flake8


Expand Down

0 comments on commit b79b7cd

Please sign in to comment.