diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fd6d7c..0285e74 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: @@ -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 diff --git a/pyproject.toml b/pyproject.toml index da4dd18..e43bde2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/tox.ini b/tox.ini index 11fbfe6..65a341e 100644 --- a/tox.ini +++ b/tox.ini @@ -5,12 +5,13 @@ 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} @@ -18,18 +19,17 @@ 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