diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 49c0985d..77f4c3b3 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -39,7 +39,7 @@ jobs: uses: snok/install-poetry@v1.3.4 - name: Install tox and mypy - run: poetry install --with dev,test,ci + run: poetry install --with ci - name: Run mypy run: tox -e mypy diff --git a/.github/workflows/parallel-support.yml b/.github/workflows/parallel-support.yml index 4980676e..d83b2b92 100644 --- a/.github/workflows/parallel-support.yml +++ b/.github/workflows/parallel-support.yml @@ -63,7 +63,7 @@ jobs: - name: Install tox run: | - poetry install --with dev,test,ci + poetry install --with ci - name: Run tox for all environments in parallel timeout-minutes: 15 @@ -109,7 +109,7 @@ jobs: - name: Install tox run: | - poetry install --with dev,test,ci + poetry install --with ci - name: Run tox for all environments in parallel timeout-minutes: 15 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3793c0f7..1e21ef23 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -63,7 +63,7 @@ jobs: - name: Install tox run: | - poetry install --with dev,test,ci + poetry install --with ci - name: Run tox for "${{ matrix.python-version }}-unit" timeout-minutes: 5 @@ -118,7 +118,7 @@ jobs: - name: Install tox run: | - poetry install --with dev,test,ci + poetry install --with ci - name: Run tox for "${{ matrix.python-version }}-integration" timeout-minutes: 15 @@ -167,7 +167,7 @@ jobs: - name: Install tox run: | - poetry install --with dev,test,ci + poetry install --with ci - name: Run tox for "${{ matrix.python-version }}-smoke" timeout-minutes: 15 diff --git a/tox.ini b/tox.ini index 02d3e26e..1e4b1ac2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,4 @@ [tox] -isolated_build = true requires = tox>4 tox-gh-actions @@ -28,9 +27,9 @@ setenv = commands_pre = poetry install --with dev,test commands = - unit: python3 -m pytest tests/unit/ --maxfail=3 {posargs} - integration: python3 -m pytest tests/integration/ --exitfirst --dist=loadscope {posargs} - smoke: python3 -m pytest tests/smoke/ --exitfirst --dist=loadscope {posargs} + unit: poetry run pytest tests/unit/ --maxfail=3 {posargs} + integration: poetry run pytest tests/integration/ --exitfirst --dist=loadscope {posargs} + smoke: poetry run pytest tests/smoke/ --exitfirst --dist=loadscope {posargs} basepython = 3.8: py38 3.9: py39 @@ -50,7 +49,7 @@ setenv = PYTHONUNBUFFERED = 1 PYTHONDONTWRITEBYTECODE = 1 commands = - python3 -m pytest tests --exitfirst \ + poetry run pytest tests --exitfirst \ -n auto --dist=loadscope \ --reruns 5 --rerun-except AssertionError \ {posargs} @@ -68,22 +67,22 @@ commands = [testenv:mypy] commands_pre = poetry install --only dev - python -m mypy --install-types --non-interactive + poetry run mypy --install-types --non-interactive commands = - python -m mypy --config-file pyproject.toml + poetry run mypy --config-file pyproject.toml [testenv:lint] commands_pre = poetry install --only dev commands = - pre-commit {posargs:run --all-files --show-diff-on-failure} + poetry run pre-commit {posargs:run --all-files --show-diff-on-failure} [testenv:clean] allowlist_externals = poetry, pytest, bash, find commands_pre = poetry install --only dev commands = - python -m cleanpy . + poetry run cleanpy . bash -c 'files=$(find . -name "*.coverage*" -type f); if [ -n "$files" ]; then echo "Removed coverage file(s):"; echo "$files" | tr " " "\n"; rm $files; fi' bash -c 'containers=$(docker ps -aq --filter label=creator=pytest-docker-tools); if [ -n "$containers" ]; then echo "Removed Docker container(s):"; docker rm -f $containers; fi' bash -c 'networks=$(docker network ls --filter name=pytest- -q); if [ -n "$networks" ]; then echo "Removed Docker network(s):"; docker network rm $networks; fi'