diff --git a/.github/workflows/test_with_tox.yml b/.github/workflows/test_with_tox.yml new file mode 100644 index 0000000..e19f860 --- /dev/null +++ b/.github/workflows/test_with_tox.yml @@ -0,0 +1,20 @@ +name: Python package + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python: [2.7, 3.6, 3.7, 3.8, 3.9] + steps: + - uses: actions/checkout@v2 + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - run: pip install tox + - run: tox -e py + - if: matrix.python == 3.9 + run: TOXENV=codespell,flake8,manifest,docs tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d67b1e0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Travis CI configuration -# see https://docs.travis-ci.com/user/languages/python - -language: python -matrix: - include: - - name: Code quality tests - env: TOXENV=flake8,manifest,docs - python: 3.8 - - name: Unit tests with Python 3.8 - env: TOXENV=py38 - python: 3.8 - - name: Unit tests with Python 3.7 - env: TOXENV=py37 - python: 3.7 - - name: Unit tests with Python 3.6 - env: TOXENV=py36 - python: 3.6 - - name: Unit tests with Python 3.5 - env: TOXENV=py35 - python: 3.5 - - name: Unit tests with Python 2.7 - env: TOXENV=py27 - python: 2.7 -cache: - directories: - - "$HOME/.cache/pip" - - "$TRAVIS_BUILD_DIR/.tox" -install: - - pip install tox -script: - - tox -e $TOXENV diff --git a/dbutils/simple_pooled_db.py b/dbutils/simple_pooled_db.py index cfd2c8b..5e31b29 100644 --- a/dbutils/simple_pooled_db.py +++ b/dbutils/simple_pooled_db.py @@ -47,7 +47,7 @@ * Connections should have some sort of maximum usage limit after which they should be automatically closed and reopened. * Prefer or enforce thread-affinity for the connections, -allowing for both sharable and non-sharable connections. +allowing for both shareable and non-shareable connections. Please note that these and other ideas have been already implemented in in PooledDB, a more sophisticated version diff --git a/tox.ini b/tox.ini index 2de6636..9700b46 100644 --- a/tox.ini +++ b/tox.ini @@ -8,20 +8,26 @@ deps = pytest commands = pytest {posargs} +[testenv:codespell] +basepython = python3.9 +deps = codespell +commands = + codespell --ignore-words-list="dont'" --quiet-level=2 --skip="./.*,./docs/main.de.*" + [testenv:flake8] -basepython = python3.8 +basepython = python3.9 deps = flake8 commands = - flake8 dbutils tests docs setup.py + flake8 . [testenv:manifest] -basepython = python3.8 +basepython = python3.9 deps = check-manifest commands = check-manifest -v [testenv:docs] -basepython = python3.8 +basepython = python3.9 deps = docutils changedir = docs commands =