From 49e85e6e74caad8048b752d691bee2d885ae34e4 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:17:37 -0700 Subject: Update Github Actions workflow --- .github/workflows/ci-linux.yml | 70 ----------------------------- .github/workflows/ci-macos.yml | 32 -------------- .github/workflows/ci-tests.yml | 95 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci-windows.yml | 28 ------------ 4 files changed, 95 insertions(+), 130 deletions(-) delete mode 100644 .github/workflows/ci-linux.yml delete mode 100644 .github/workflows/ci-macos.yml create mode 100644 .github/workflows/ci-tests.yml delete mode 100644 .github/workflows/ci-windows.yml diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml deleted file mode 100644 index 1a8897f..0000000 --- a/.github/workflows/ci-linux.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build/test on Linux -# This workflow is triggered on pushes to the repository. -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - py: [ - '2.7', - '3.5', - '3.6', - '3.7', - '3.8', - 'pypy2', - 'pypy3' - ] - name: "Python: ${{ matrix.py }}" - steps: - - uses: actions/checkout@master - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.py }} - architecture: x64 - - run: pip install tox - - name: Running tox - run: tox -e py - coverage: - runs-on: ubuntu-latest - name: Validate coverage for Python 2/3 - steps: - - uses: actions/checkout@master - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: 2.7 - architecture: x64 - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - architecture: x64 - - run: pip install tox - - run: tox -e py38,py27,coverage - docs: - runs-on: ubuntu-latest - name: Build the documentation - steps: - - uses: actions/checkout@master - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - architecture: x64 - - run: pip install tox - - run: tox -e docs - lint: - runs-on: ubuntu-latest - name: Lint the package - steps: - - uses: actions/checkout@master - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - architecture: x64 - - run: pip install tox - - run: tox -e lint diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml deleted file mode 100644 index 384bbe6..0000000 --- a/.github/workflows/ci-macos.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Build/test on MacOS -# This workflow is triggered on pushes to the repository. -on: [push, pull_request] - -jobs: - test: - runs-on: macOS-latest - strategy: - matrix: - py: [ - '2.7', - '3.5', - '3.6', - '3.7', - '3.8', - 'pypy2', - 'pypy3' - ] - architecture: ['x64'] - name: "Python: ${{ matrix.py }}" - steps: - - uses: actions/checkout@master - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.py }} - architecture: ${{ matrix.architecture }} - - run: pip install tox - - name: Running tox - run: | - ulimit -n 4096 - tox -e py diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml new file mode 100644 index 0000000..54b229e --- /dev/null +++ b/.github/workflows/ci-tests.yml @@ -0,0 +1,95 @@ +name: Build and test + +on: + # Only on pushes to master or one of the release branches we build on push + push: + branches: + - master + - "[0-9].[0-9]+-branch" + tags: + # Build pull requests + pull_request: + +jobs: + test: + strategy: + matrix: + py: + - "2.7" + - "3.5" + - "3.6" + - "3.7" + - "3.8" + - "pypy3" + os: + - "ubuntu-latest" + - "windows-latest" + - "macos-latest" + architecture: + - x64 + - x86 + + exclude: + # Linux and macOS don't have x86 python + - os: "ubuntu-latest" + architecture: x86 + - os: "macos-latest" + architecture: x86 + # Building on PyPy3 on Windows is broken + - os: "windows-latest" + py: "pypy3" + + 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 + steps: + - uses: actions/checkout@v2 + - name: Setup python 2.7 + uses: actions/setup-python@v2 + with: + python-version: 2.7 + architecture: x64 + - name: Setup python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + architecture: x64 + + - run: pip install tox + - run: tox -e py38,py27,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.8 + architecture: x64 + - run: pip install tox + - run: tox -e docs + lint: + runs-on: ubuntu-latest + name: Lint the package + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + architecture: x64 + - run: pip install tox + - run: tox -e lint diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml deleted file mode 100644 index 1e6406f..0000000 --- a/.github/workflows/ci-windows.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Build/test on Windows -# This workflow is triggered on pushes to the repository. -on: [push, pull_request] - -jobs: - test: - runs-on: windows-2019 - strategy: - matrix: - py: [ - '2.7', - '3.5', - '3.6', - '3.7', - '3.8' - ] - architecture: ['x86', 'x64'] - name: "Python: ${{ matrix.py }} (${{ matrix.architecture }})" - steps: - - uses: actions/checkout@master - - name: Setup python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.py }} - architecture: ${{ matrix.architecture }} - - run: pip install tox - - name: Running tox - run: tox -e py -- cgit v1.2.1 From da0f1fbd0023f6a924195d5f7fd1827ea658c953 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:17:54 -0700 Subject: Point image badge to correct location --- README.rst | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 2a307a6..f9bf1a8 100644 --- a/README.rst +++ b/README.rst @@ -5,14 +5,8 @@ Waitress :target: https://pypi.org/project/waitress/ :alt: latest version of waitress on PyPI -.. image:: https://github.com/Pylons/waitress/workflows/Build/test%20on%20Linux/badge.svg?branch=master - :target: https://github.com/Pylons/waitress/actions?query=workflow%3A%22Build%2Ftest+on+Linux%22 - -.. image:: https://github.com/Pylons/waitress/workflows/Build/test%20on%20MacOS/badge.svg?branch=master - :target: https://github.com/Pylons/waitress/actions?query=workflow%3A%22Build%2Ftest+on+MacOS%22 - -.. image:: https://github.com/Pylons/waitress/workflows/Build/test%20on%20Windows/badge.svg?branch=master - :target: https://github.com/Pylons/waitress/actions?query=workflow%3A%22Build%2Ftest+on+Windows%22 +.. image:: https://github.com/Pylons/waitress/workflows/Build%20and%20test/badge.svg + :target: https://github.com/Pylons/waitress/actions?query=workflow%3A%22Build+and+test%22 .. image:: https://readthedocs.org/projects/waitress/badge/?version=master :target: https://docs.pylonsproject.org/projects/waitress/en/master -- cgit v1.2.1 From 6eb201a4376ee9dc71bd003f93b7d91ce11d2fbf Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:18:17 -0700 Subject: Update setup.cfg tool:pytest to remove cov-report --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 77afa15..f38e784 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,4 +64,4 @@ python_files = test_*.py python_classes = Test_* testpaths = tests -addopts = -W always --cov --cov-report=term-missing +addopts = -W always --cov -- cgit v1.2.1 From 940d9bdcb1eaa6b7e7316679b3c95afd8dfc194e Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:18:39 -0700 Subject: Remove basepython from tox.ini --- tox.ini | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tox.ini b/tox.ini index 08baf49..498843d 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,6 @@ setenv = COVERAGE_FILE=.coverage.{envname} [testenv:coverage] -basepython = python3.8 commands = coverage combine coverage xml @@ -30,7 +29,6 @@ depends = py27, py35 [testenv:lint] skip_install = True -basepython = python3.8 commands = black --check --diff . check-manifest @@ -57,7 +55,6 @@ extras = [testenv:run-flake8] skip_install = True -basepython = python3.8 commands = flake8 src/waitress/ tests deps = @@ -66,7 +63,6 @@ deps = [testenv:run-black] skip_install = True -basepython = python3.8 commands = black . deps = @@ -74,7 +70,6 @@ deps = [testenv:build] skip_install = true -basepython = python3.8 commands = # clean up build/ and dist/ folders python -c 'import shutil; shutil.rmtree("build", ignore_errors=True)' -- cgit v1.2.1 From a46b588efaaba58e7b83b6f8c87be212b1cc7373 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:18:58 -0700 Subject: coverage should fail if not 100% --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 498843d..bda05da 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ setenv = commands = coverage combine coverage xml - coverage report --show-missing + coverage report --fail-under=100 deps = coverage setenv = -- cgit v1.2.1 From 42bdacda2ce32422cc948cee5e539cc12b709bff Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:19:20 -0700 Subject: coverage env does not need project installed --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index bda05da..477ca28 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,7 @@ setenv = COVERAGE_FILE=.coverage.{envname} [testenv:coverage] +skip_install = True commands = coverage combine coverage xml -- cgit v1.2.1 From a1ece4d2f0447f0a3df82d5b0466f3ec61105e60 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 5 May 2020 01:19:33 -0700 Subject: Depend on py27,py38 in coverage --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 477ca28..6ca71ad 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ deps = coverage setenv = COVERAGE_FILE=.coverage -depends = py27, py35 +depends = py27, py38 [testenv:lint] skip_install = True -- cgit v1.2.1