diff options
author | Gael Pasgrimaud <gael@gawel.org> | 2020-11-18 12:04:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 12:04:27 +0100 |
commit | 4dcbcc52a21f448e8ee3760e4758067f4e48389c (patch) | |
tree | 5f6d75f8a5f5dad947ea8d672aab6108e232ab5e | |
parent | 6860cbcb368cc3af8f7f650fa5253d7b2538d903 (diff) | |
parent | 8e84e4a73ed402b116e8603504b1ddce32c4dda8 (diff) | |
download | webtest-4dcbcc52a21f448e8ee3760e4758067f4e48389c.tar.gz |
Merge pull request #231 from Pylons/github-actions
Switch from Travis to GitHub Actions
-rw-r--r-- | .gitattributes | 5 | ||||
-rw-r--r-- | .github/workflows/ci-tests.yml | 72 | ||||
-rw-r--r-- | .travis.yml | 24 | ||||
-rw-r--r-- | CHANGELOG.rst | 6 | ||||
-rw-r--r-- | docs/contributing.rst | 2 | ||||
-rw-r--r-- | setup.cfg | 13 | ||||
-rw-r--r-- | setup.py | 12 | ||||
-rw-r--r-- | tox.ini | 48 |
8 files changed, 114 insertions, 68 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..75b85d9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Set the default behaviour, in case poeple don't have core.autocrlf set +* text=auto + +# Always lf, this file size is checked in a test +tests/__init__.py text eol=lf diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml new file mode 100644 index 0000000..4d7a1cc --- /dev/null +++ b/.github/workflows/ci-tests.yml @@ -0,0 +1,72 @@ +name: Build and test + +on: + # Build on pushes to master + push: + branches: + - master + tags: + # Build pull requests + pull_request: + +jobs: + test: + strategy: + matrix: + py: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + os: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" + architecture: + - x64 + - x86 + exclude: + # Linux and macOS don't have x86 python + - os: "ubuntu-latest" + architecture: x86 + - os: "macos-latest" + architecture: x86 + + name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py }} + architecture: ${{ matrix.architecture }} + - run: pip install tox + - name: Running tox + run: tox -e py + coverage: + runs-on: ubuntu-latest + name: Validate coverage + # Assume coverage is identical across supported versions of Python. + # Choose the latest Python. + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - run: pip install tox + - run: tox -e py39,coverage + docs: + runs-on: ubuntu-latest + name: Build the documentation + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - run: pip install tox + - run: tox -e docs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fd8ba29..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: python - -matrix: - include: - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - env: TOXENV=py37 - dist: xenial - - python: 3.8 - env: TOXENV=py38 - - - python: 3.6 - env: TOXENV=docs - -install: - - travis_retry pip install tox - -script: - - travis_retry tox - -cache: - directories: - - $HOME/.cache/pip diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5e91764..23f33c5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,12 @@ News - Dropped support for Python 2.7 and 3.5. +- Added support for Python 3.9. + +- Clean up dependencies and requirements. + +- Switch from Travis to GitHub Actions for building and testing. + 2.0.35 (2020-04-27) ------------------- diff --git a/docs/contributing.rst b/docs/contributing.rst index 9d2a7bb..f2acbbb 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -23,7 +23,7 @@ Execute tests .. code-block:: bash - $ bin/nosetests + $ bin/pytest Doctest: forms.rst ... ok Doctest: index.rst ... ok @@ -4,18 +4,6 @@ dev = develop easy_install webtest[tests] [bdist_wheel] universal=0 -[nosetests] -verbosity=2 -detailed-errors = True -with-doctest = True -doctest-extension = rst -doctest-fixtures = _fixt -# XXX: docs/index.rst requires lxml -include = docs -exclude = (CHANGELOG|changelog|contributing).rst -cover-package=webtest -doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE - [tool:pytest] addopts = -p no:warnings --doctest-modules @@ -26,4 +14,5 @@ addopts = -p no:warnings --ignore=bootstrap.py --ignore=examples/ --ignore=docs/conf.py + -W always doctest_optionflags= NORMALIZE_WHITESPACE ELLIPSIS @@ -12,14 +12,18 @@ install_requires = [ ] tests_require = [ - 'nose<1.3.0', 'coverage', - 'PasteDeploy', 'WSGIProxy2', 'pyquery' + 'coverage', + 'PasteDeploy', + 'pyquery', + 'pytest', + 'pytest-cov', + 'WSGIProxy2', ] docs_extras = [ - 'Sphinx >= 1.8.1', 'docutils', 'pylons-sphinx-themes >= 1.0.8', + 'Sphinx >= 1.8.1', ] setup(name='WebTest', @@ -38,6 +42,7 @@ setup(name='WebTest', "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", ], keywords='wsgi test unit tests web', author='Ian Bicking', @@ -56,7 +61,6 @@ setup(name='WebTest', zip_safe=False, python_requires='>=3.6, <4', install_requires=install_requires, - test_suite='nose.collector', tests_require=tests_require, extras_require={ 'tests': tests_require, @@ -1,43 +1,37 @@ [tox] -skip_missing_interpreters=true -envlist=py36,py37,py38,coverage,docs +skip_missing_interpreters = true +envlist = + py36,py37,py38,py39, + coverage, + docs [testenv] -skip_install=true setenv = - LC_ALL=C - LANG=C - COVERAGE_FILE=.coverage.{envname} -deps = - pytest - -e .[tests,docs] - lxml - pyquery - BeautifulSoup4 - PasteDeploy - WSGIProxy2 - coverage + LC_ALL=C + LANG=C + COVERAGE_FILE=.coverage.{envname} +extras = + tests commands = - python --version - pip freeze - coverage run {envbindir}/pytest -xv [] - coverage report --show-missing + python --version + pip freeze + pytest --cov {posargs:} [testenv:coverage] -skip_install=false -skipsdist=true +skip_install = true deps = coverage setenv = - COVERAGE_FILE=.coverage + COVERAGE_FILE=.coverage commands = - {envbindir}/coverage erase - {envbindir}/coverage combine - {envbindir}/coverage xml - {envbindir}/coverage report --show-missing + coverage combine + coverage xml + # We want to get this to 100, but for now we compromise. + # See https://github.com/Pylons/webtest/pull/231#issuecomment-729574898 + coverage report --show-missing --fail-under=96 [testenv:docs] -basepython = python3.6 +basepython = python3.9 whitelist_externals = make commands = make -C docs html BUILDDIR={envdir} "SPHINXOPTS=-W -E" |