diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1a52a16..02c3936 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -26,13 +26,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest mock pytest-mock .[github] + pip install tox flake8 - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names flake8 boundary_layer boundary_layer_default_plugin bin test --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 boundary_layer boundary_layer_default_plugin bin test --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + - name: Test with tox run: | - pytest test + # py`echo ${{ matrix.python-version }} | tr -d '.'` yields py27, py35, etc. which is what tox needs + tox --recreate -e py`echo ${{ matrix.python-version }} | tr -d '.'` test diff --git a/.travis.yml b/.travis.yml index f477799..e9950d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: install: - pip install --upgrade tox coveralls -script: tox +script: tox --recreate test after_success: - ./run_coveralls.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a70d667..3fddc7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ These are the steps for submitting a proposed contribution to boundary-layer: 3. Make your changes 4. Document new functionality as appropriate 5. Add new tests if possible -6. [Recommended] Run the test suite locally with `tox` +6. [Recommended] Run the test suite locally with `tox --recreate test` 7. Push your changes to your fork 8. Send a pull request! diff --git a/tox.ini b/tox.ini index 3fd3999..09da90c 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ deps = pytest==3.8.1 extras = github commands = - pytest -vv test + pytest -vv {posargs} [testenv:py27] commands = @@ -21,7 +21,7 @@ commands = --cov=boundary_layer_default_plugin \ --cov-report=term-missing \ --cov-report=xml \ - test + {posargs} [testenv:lint] commands =