From 45cfe90c84985ac50f6c34d6124294c2f0898379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20K=C3=B6gl?= Date: Fri, 16 Jun 2023 22:41:43 +0200 Subject: [PATCH] Switch to GitHub actions (#144) * Switch to GitHub actions * add support for Python 3.11, remove 3.5, 3.6 --- .github/workflows/test.yaml | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 33 --------------------------------- setup.py | 4 +--- 3 files changed, 35 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/test.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..639e18d --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,34 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"] + + 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 flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install coveralls +# - name: Lint with flake8 +# run: | + # stop the build if there are Python syntax errors or undefined names + # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test + run: | + coverage run --source=jsonpointer tests.py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 865f8fa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -dist: xenial -language: python -python: -- '2.7' -- '3.5' -- '3.6' -- '3.7' -- '3.8' -- '3.9' -- 3.10-dev -- nightly -- pypy3 -addons: - apt: - packages: - - pandoc -install: -- travis_retry pip install -r requirements.txt -- travis_retry pip install coveralls -script: -- coverage run --source=jsonpointer tests.py -after_script: -- coveralls -before_deploy: -- pip install -r requirements-dev.txt -deploy: - provider: pypi - user: skoegl - password: - secure: ppMhKu82oIig1INyiNkt9veOd5FUUIKFUXj2TzxMSdzPtzAhQnScJMGPEtPfH8MwXng/CtJiDWS6zJzRFsW/3Ch+JHPkOtxOfkopBs1t1SpCyqNPSvf6Zxh83Dg6Bq6+8GyVW1RPuNIGflsvzY2C3z5i79FQXwZd8EQlg7Vu0Wo= - on: - tags: true - distributions: sdist bdist_wheel diff --git a/setup.py b/setup.py index ad43bd5..7753be1 100644 --- a/setup.py +++ b/setup.py @@ -56,8 +56,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - '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', @@ -80,7 +78,7 @@ package_data={'': ['requirements.txt']}, scripts=['bin/jsondiff', 'bin/jsonpatch'], classifiers=CLASSIFIERS, - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*', project_urls={ 'Website': 'https://github.com/stefankoegl/python-json-patch', 'Repository': 'https://github.com/stefankoegl/python-json-patch.git',