Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrul committed Aug 25, 2024
1 parent 29eeb9d commit 1020086
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 134 deletions.
101 changes: 7 additions & 94 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,84 +8,12 @@ env:
pip --no-cache-dir"

jobs:
tests_py27:
runs-on: ubuntu-20.04
container: python:2.7
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: $PIP install virtualenv tox

- name: Run the unit tests
run: TOXENV=py27 tox

- name: Run the end-to-end tests
run: TOXENV=py27 END_TO_END=1 tox

tests_py34:
runs-on: ubuntu-20.04
container: python:3.4
strategy:
fail-fast: false

env:
# Run actions/checkout@v3
# /__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /__e/node20/bin/node)
#
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: $PIP install virtualenv tox

- name: Run the unit tests
run: TOXENV=py34 tox

- name: Run the end-to-end tests
run: TOXENV=py34 END_TO_END=1 tox

tests_py35:
runs-on: ubuntu-20.04
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Work around pip SSL cert verify error
run: sudo $PIP config set global.trusted-host 'pypi.python.org pypi.org files.pythonhosted.org'

- name: Set up Python 3.5
uses: actions/setup-python@v5
with:
python-version: 3.5

- name: Install dependencies
run: $PIP install virtualenv tox

- name: Set variable for TOXENV based on Python version
id: toxenv
run: python -c 'import sys; print("TOXENV=py%d%d" % (sys.version_info.major, sys.version_info.minor))' | tee -a $GITHUB_OUTPUT

- name: Run the unit tests
run: TOXENV=${{steps.toxenv.outputs.TOXENV}} tox

- name: Run the end-to-end tests
run: TOXENV=${{steps.toxenv.outputs.TOXENV}} END_TO_END=1 tox

tests_py3x:
runs-on: ubuntu-20.04
tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]

steps:
- uses: actions/checkout@v4
Expand All @@ -108,23 +36,8 @@ jobs:
- name: Run the end-to-end tests
run: TOXENV=${{steps.toxenv.outputs.TOXENV}} END_TO_END=1 tox

coverage_py27:
runs-on: ubuntu-20.04
container: python:2.7
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: $PIP install virtualenv tox

- name: Run unit test coverage
run: TOXENV=cover tox

coverage_py3x:
runs-on: ubuntu-20.04
coverage:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -142,10 +55,10 @@ jobs:
run: $PIP install virtualenv tox

- name: Run unit test coverage
run: TOXENV=cover3 tox
run: TOXENV=cover tox

docs:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ likely work fine on most UNIX systems.

Supervisor will not run at all under any version of Windows.

Supervisor is intended to work on Python 3 version 3.4 or later
and on Python 2 version 2.7.
Supervisor is intended to work on Python 3 version 3.8 or later.

Documentation
-------------
Expand Down
20 changes: 0 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@
import os
import sys

py_version = sys.version_info[:2]

if py_version < (2, 7):
raise RuntimeError('On Python 2, Supervisor requires Python 2.7 or later')
elif (3, 0) < py_version < (3, 4):
raise RuntimeError('On Python 3, Supervisor requires Python 3.4 or later')

# setuptools is required as a runtime dependency only on
# Python < 3.8. See the comments in supervisor/compat.py.
requires = [
"setuptools; python_version < '3.8'",
]

tests_require = []
testing_extras = tests_require + [
'pytest',
Expand Down Expand Up @@ -57,13 +44,7 @@
'Topic :: System :: Monitoring',
'Topic :: System :: Systems Administration',
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -91,7 +72,6 @@
author="Chris McDonough",
author_email="[email protected]",
packages=find_packages(),
install_requires=requires,
extras_require={
'testing': testing_extras,
},
Expand Down
20 changes: 2 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
cover,cover3,docs,py27,py34,py35,py36,py37,py38,py39,py310,py311,py312
cover,docs,py38,py39,py310,py311,py312

[testenv]
deps =
Expand All @@ -12,30 +12,14 @@ passenv = END_TO_END
commands =
pytest --capture=no {posargs}

[testenv:py27-configparser]
;see https://github.com/Supervisor/supervisor/issues/1230
basepython = python2.7
deps =
{[testenv]deps}
configparser
passenv = {[testenv]passenv}
commands = {[testenv]commands}

[testenv:cover]
basepython = python2.7
basepython = python3.8
commands =
pytest --capture=no --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs}
deps =
{[testenv]deps}
pytest-cov

[testenv:cover3]
basepython = python3.8
commands =
pytest --capture=no --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs}
deps =
{[testenv:cover]deps}

[testenv:docs]
deps =
Sphinx
Expand Down

0 comments on commit 1020086

Please sign in to comment.