mirror of
https://github.com/caronc/apprise.git
synced 2024-11-24 17:14:00 +01:00
CI: Remove Travis CI, and tox (#705)
This commit is contained in:
parent
7c993fb7f6
commit
eafa7498b2
67
.travis.yml
67
.travis.yml
@ -1,67 +0,0 @@
|
||||
language: python
|
||||
|
||||
dist: focal
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libdbus-1-dev
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- 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: "3.10"
|
||||
env: TOXENV=py310
|
||||
- python: "3.11-dev"
|
||||
env: TOXENV=py311
|
||||
# PyPy Environments
|
||||
- python: "pypy3.6-7.3.3"
|
||||
env: TOXENV=pypy36
|
||||
- python: "pypy3.9-7.3.9"
|
||||
env: TOXENV=pypy39
|
||||
# An extra environment where additional packages are not installed
|
||||
- python: "3.9"
|
||||
env:
|
||||
- TOXENV=bare
|
||||
|
||||
install:
|
||||
- pip install babel
|
||||
|
||||
# Use up-to-date versions of tox, pip, virtualenv, and wheel.
|
||||
- pip install --upgrade tox pip virtualenv wheel
|
||||
|
||||
# cryptography 3.3 is the last one not needing a Rust toolchain. Let's use it for PyPy.
|
||||
- if [[ $TOXENV == 'pypy'* ]]; then pip install "cryptography<3.4"; fi
|
||||
|
||||
# Install project dependencies.
|
||||
- pip install codecov
|
||||
- pip install -r dev-requirements.txt
|
||||
- pip install -r requirements.txt
|
||||
|
||||
# bare installs do not include extra package dependencies
|
||||
- if [[ $TOXENV != 'bare' ]]; then pip install -r all-plugin-requirements.txt; fi
|
||||
# pypy and bare installs do not include dbus-python
|
||||
- if [[ $TOXENV != 'bare' ]] && [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install dbus-python; fi
|
||||
|
||||
# Fix/workaround: Python 3.7 importlib-metadata becomes incompatible with flake8,
|
||||
# unless we use a version that still supports EntryPoints.get().
|
||||
# `tox.ini` has been updated to not call flake8 on Python 3.7.
|
||||
- if [[ $TOXENV == 'py37' || $TOXENV == 'pypy37' ]]; then pip uninstall --yes flake8; fi
|
||||
|
||||
# run tests
|
||||
script:
|
||||
- tox
|
||||
|
||||
after_success:
|
||||
- tox -e coverage-report
|
||||
- codecov
|
||||
|
||||
notifications:
|
||||
email: false
|
@ -22,7 +22,7 @@ System Administrators and DevOps who wish to send a notification now no longer n
|
||||
[![Follow](https://img.shields.io/twitter/follow/l2gnux)](https://twitter.com/l2gnux/)<br/>
|
||||
[![Discord](https://img.shields.io/discord/558793703356104724.svg?colorB=7289DA&label=Discord&logo=Discord&logoColor=7289DA&style=flat-square)](https://discord.gg/MMPeN2D)
|
||||
[![Python](https://img.shields.io/pypi/pyversions/apprise.svg?style=flat-square)](https://pypi.org/project/apprise/)
|
||||
[![Build Status](https://travis-ci.com/caronc/apprise.svg?branch=master)](https://app.travis-ci.com/github/caronc/apprise)
|
||||
[![Build Status](https://github.com/caronc/apprise/actions/workflows/tests.yml/badge.svg)](https://github.com/caronc/apprise/actions/workflows/tests.yml)
|
||||
[![CodeCov Status](https://codecov.io/github/caronc/apprise/branch/master/graph/badge.svg)](https://codecov.io/github/caronc/apprise)
|
||||
[![PyPi](https://img.shields.io/pypi/dm/apprise.svg?style=flat-square)](https://pypi.org/project/apprise/)
|
||||
|
||||
|
@ -30,7 +30,6 @@
|
||||
# API is documented here:
|
||||
# - https://www.bulksms.com/developer/json/v1/#tag/Message
|
||||
import re
|
||||
import six
|
||||
import requests
|
||||
import json
|
||||
from itertools import chain
|
||||
@ -192,7 +191,7 @@ class NotifyBulkSMS(NotifyBase):
|
||||
|
||||
# Setup our route
|
||||
self.route = self.template_args['route']['default'] \
|
||||
if not isinstance(route, six.string_types) else route.upper()
|
||||
if not isinstance(route, str) else route.upper()
|
||||
if self.route not in BULKSMS_ROUTING_GROUPS:
|
||||
msg = 'The route specified ({}) is invalid.'.format(route)
|
||||
self.logger.warning(msg)
|
||||
|
@ -4,5 +4,4 @@ pytest
|
||||
pytest-cov
|
||||
pytest-mock
|
||||
pytest-xdist
|
||||
tox
|
||||
babel
|
||||
|
@ -68,7 +68,7 @@ def setup_glib_environment():
|
||||
importlib.reload(sys.modules['apprise.plugins.NotifyDBus'])
|
||||
|
||||
# We need to fake our dbus environment for testing purposes since
|
||||
# the gi library isn't available in Travis CI
|
||||
# the gi library isn't available on CI
|
||||
gi = types.ModuleType(gi_name)
|
||||
gi.repository = types.ModuleType(gi_name + '.repository')
|
||||
|
||||
|
@ -58,7 +58,7 @@ def setup_glib_environment():
|
||||
reload_plugin('NotifyGnome')
|
||||
|
||||
# We need to fake our gnome environment for testing purposes since
|
||||
# the gi library isn't available in Travis CI
|
||||
# the gi library isn't available on CI
|
||||
gi = types.ModuleType(gi_name)
|
||||
gi.repository = types.ModuleType(gi_name + '.repository')
|
||||
gi.module = types.ModuleType(gi_name + '.module')
|
||||
|
144
tox.ini
144
tox.ini
@ -1,144 +0,0 @@
|
||||
[tox]
|
||||
envlist = py36,py37,py38,py39,py310,py311.pypy36,pypy39,bare,coverage-report
|
||||
|
||||
[testenv]
|
||||
# Prevent random setuptools/pip breakages like
|
||||
# https://github.com/pypa/setuptools/issues/1042 from breaking our builds.
|
||||
setenv =
|
||||
VIRTUALENV_NO_DOWNLOAD=1
|
||||
deps=
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:py36]
|
||||
deps=
|
||||
dbus-python
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:py37]
|
||||
deps=
|
||||
dbus-python
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
|
||||
[testenv:py38]
|
||||
deps=
|
||||
dbus-python
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:py39]
|
||||
deps=
|
||||
dbus-python
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:py310]
|
||||
deps=
|
||||
dbus-python
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:py311]
|
||||
deps=
|
||||
dbus-python
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run --parallel -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:bare]
|
||||
deps=
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:pypy36]
|
||||
deps=
|
||||
# cryptography 3.3 is the last one not needing a Rust toolchain.
|
||||
cryptography<3.4
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:pypy37]
|
||||
deps=
|
||||
# cryptography 3.3 is the last one not needing a Rust toolchain.
|
||||
cryptography<3.4
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
|
||||
[testenv:pypy38]
|
||||
deps=
|
||||
# cryptography 3.3 is the last one not needing a Rust toolchain.
|
||||
cryptography<3.4
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:pypy39]
|
||||
deps=
|
||||
# cryptography 3.3 is the last one not needing a Rust toolchain.
|
||||
cryptography<3.4
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/all-plugin-requirements.txt
|
||||
commands =
|
||||
python setup.py compile_catalog
|
||||
coverage run -m pytest {posargs}
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
[testenv:coverage-report]
|
||||
deps = coverage
|
||||
skip_install = true
|
||||
commands=
|
||||
coverage combine
|
||||
coverage xml
|
||||
coverage report
|
Loading…
Reference in New Issue
Block a user