diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..da4bcc4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - python-version: "3.8" + toxenv: py38 + os: ubuntu-latest + - python-version: "3.9" + toxenv: py39 + os: ubuntu-latest + - python-version: "3.10" + toxenv: py310 + os: ubuntu-latest + - python-version: "3.11" + toxenv: py311 + os: ubuntu-latest + - python-version: "3.12" + toxenv: py312 + os: ubuntu-latest + - python-version: "3.13" + toxenv: py313 + os: ubuntu-latest + - python-version: "pypy-3.9" + toxenv: pypy + os: ubuntu-latest + - python-version: "3.13" + toxenv: py3-cover,coverage + os: ubuntu-latest + coverage: true + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Run tests with tox + run: tox + env: + TOXENV: ${{ matrix.toxenv }} + + - name: Upload coverage to Codecov + if: matrix.coverage + uses: codecov/codecov-action@v3 + with: + files: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: false diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0dc1b1e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Wire up travis -language: python -sudo: false - -matrix: - include: - - python: 2.7 - env: TOXENV=py27 - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - env: TOXENV=py37 - - python: 3.8 - env: TOXENV=py38 - - python: 3.9 - env: TOXENV=py39 - - python: pypy - env: TOXENV=pypy - - python: 3.9 - env: TOXENV=py2-cover,py3-cover,coverage - -install: - - travis_retry pip install tox - -script: - - travis_retry tox - -after_success: - - bash <(curl -s https://codecov.io/bash) - -notifications: - email: - - yang@keitheis.org diff --git a/README.rst b/README.rst index 3a1162b..377595c 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ Alog ==== -.. image:: https://travis-ci.com/keitheis/alog.svg?branch=master - :target: https://travis-ci.com/keitheis/alog +.. image:: https://github.com/keitheis/alog/actions/workflows/ci.yml/badge.svg + :target: https://github.com/keitheis/alog/actions/workflows/ci.yml .. image:: https://codecov.io/gh/keitheis/alog/branch/master/graph/badge.svg :target: https://codecov.io/gh/keitheis/alog diff --git a/setup.cfg b/setup.cfg index 3153758..9788665 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,6 @@ universal=1 [check-manifest] ignore = - .travis.yml PKG-INFO *.egg-info *.egg-info/* diff --git a/setup.py b/setup.py index c898f12..51efe90 100644 --- a/setup.py +++ b/setup.py @@ -31,12 +31,13 @@ 'Topic :: System :: Logging', 'Topic :: Software Development', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - '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', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], diff --git a/tox.ini b/tox.ini index 99567ef..9277ea6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,50 +1,40 @@ [tox] envlist = - py27,py36,py37,py38,py39,pypy, - {py2,py3}-cover,coverage + py38,py39,py310,py311,py312,py313,pypy, + py3-cover,coverage [testenv] # Most of these are defaults but if you specify any you can't fall back # to defaults for others. basepython = - py27: python2.7 - py36: python3.6 - py37: python3.7 py38: python3.8 py39: python3.9 + py310: python3.10 + py311: python3.11 + py312: python3.12 + py313: python3.13 pypy: pypy - py2: python2.7 - py3: python3.9 + py3: python3.13 -passenv = TOXENV CI TRAVIS TRAVIS_* +passenv = TOXENV,CI,GITHUB_* commands = pip install alog[testing] pytest tests --junitxml=pytest-{envname}.xml {posargs:} -[py-cover] +[testenv:py3-cover] commands = pip install alog[testing] pytest tests --cov-report term-missing --cov=alog - -[testenv:py2-cover] -commands = - {[py-cover]commands} -setenv = - COVERAGE_FILE=.coverage.py2 - -[testenv:py3-cover] -commands = - {[py-cover]commands} setenv = COVERAGE_FILE=.coverage.py3 [testenv:coverage] -basepython = python3.9 +basepython = python3.13 commands = coverage erase coverage combine coverage xml - coverage report --show-missing --fail-under=100 + coverage report --show-missing --fail-under=90 codecov -e TOXENV deps = coverage