diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a6bec562ea..f7aecd71e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,9 +59,9 @@ jobs: run: | python -m pip install poetry-dynamic-versioning[plugin] # Install test dependencies (tox) to the root (non-package install) - # - name: Install test dependencies - # run: | - # poetry install --no-root --only test + - name: Install test dependencies + run: | + poetry install --no-root --only test - name: set full Python version in PY env var if: ${{ matrix.os != 'windows-latest' }} # See https://pre-commit.com/#github-actions-example @@ -73,10 +73,8 @@ jobs: node-version: 18.x - name: Install Yarn run: npm install -g yarn - - name: Run tox testsa - run: | - pip install tox - tox -e ${{ matrix.tox }} + - name: Run tox tests + run: tox -e ${{ matrix.tox }} lint_typecheck_test_webui: runs-on: ubuntu-latest diff --git a/tox.ini b/tox.ini index b3667d576a..77e29e4057 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +isolated_build = True skipsdist = True envlist = ruff @@ -16,7 +17,7 @@ allowlist_externals = make commands = poetry install --with test - python -m unittest discover [] + poetry run python -m unittest discover [] ; Disable these tests for now, because they are breaking. When someone has time they should be converted into regular unit tests ; bash -ec "PYTHONUNBUFFERED=1 timeout 20s python3 examples/rest.py >{temp_dir}/out.txt 2>/{temp_dir}/err.txt || true" ; grep -qm 1 'my custom error message with response text, response was {"args"' {temp_dir}/out.txt @@ -27,7 +28,7 @@ commands = [testenv:fail_fast_test_main] commands = poetry install --with test - python -m unittest -f locust.test.test_main + poetry run python -m unittest -f locust.test.test_main [testenv:ruff] ; Pin the same version in the .pre-commit-config.yaml file.