From c24b82202692f331ab02170107398d84fa326e90 Mon Sep 17 00:00:00 2001 From: Dirk Moors Date: Fri, 13 Oct 2023 11:33:52 +0200 Subject: [PATCH] Switch to GH Actions (#18) * Fix travis * Updated travis CI * Updated travis CI config * Removed travis support -switching to gh-actions * Changed build trigger * Changed build trigger * Debugging * Fix build trigger * Updated version --------- Co-authored-by: Dirk Moors --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++++++++ .travis.yml | 29 ------------------------- CONTRIBUTING.rst | 4 ++-- HISTORY.rst | 5 +++++ README.rst | 4 ++-- rest_framework_tus/__init__.py | 2 +- setup.cfg | 2 +- tox.ini | 12 ++++++----- 8 files changed, 57 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cdfbd19 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: Python package + +on: + pull_request: + branches: + - 'master' + paths-ignore: + - 'docs/*' + - 'example/*' + - 'README.rst' + - 'CONTRIBUTING.rst' + - 'HISTORY.rst' + - '.coverage' + - '.editorconfig' + - '.gitignore' + - '.pre-commit-config.yaml' + - 'LICENSE' + - 'Makefile' + - 'MANIFEST.in' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['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 + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6602e44..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: python -addons: - apt: - sources: - - deadsnakes - packages: - - python3.5 - - python3.6 -install: - - pip install tox -script: - - tox -env: - - TOXENV=py27-django-18 - - TOXENV=py34-django-18 - - TOXENV=py35-django-18 - - TOXENV=py36-django-18 - - TOXENV=py27-django-19 - - TOXENV=py34-django-19 - - TOXENV=py35-django-19 - - TOXENV=py36-django-19 - - TOXENV=py27-django-110 - - TOXENV=py34-django-110 - - TOXENV=py35-django-110 - - TOXENV=py36-django-110 - - TOXENV=py27-django-111 - - TOXENV=py34-django-111 - - TOXENV=py35-django-111 - - TOXENV=py36-django-111 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1b845f7..087ca86 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -100,8 +100,8 @@ Before you submit a pull request, check that it meets these guidelines: 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. -3. The pull request should work for Python 3.8+, and for PyPy. Check - https://travis-ci.org/dirkmoors/drf-tus/pull_requests +3. The pull request should work for Python 3.9+, and for PyPy. Check + https://github.com/dirkmoors/drf-tus/pulls and make sure that the tests pass for all supported Python versions. Tips diff --git a/HISTORY.rst b/HISTORY.rst index 74602fc..37922f1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +2.0.1 (2023-10-13) +++++++++++++++++++ + +* Repair CI and tests. + 2.0.0 (2023-07-06) ++++++++++++++++++ diff --git a/README.rst b/README.rst index f04abee..834beb0 100644 --- a/README.rst +++ b/README.rst @@ -5,8 +5,8 @@ drf-tus .. image:: https://badge.fury.io/py/drf-tus.svg :target: https://badge.fury.io/py/drf-tus -.. image:: https://travis-ci.org/dirkmoors/drf-tus.svg?branch=master - :target: https://travis-ci.org/dirkmoors/drf-tus +.. image:: https://github.com/OWNER/REPOSITORY/actions/workflows/ci.yml/badge.svg + :target: https://github.com/dirkmoors/drf-tus/actions A Tus (tus.io) library for Django Rest Framework diff --git a/rest_framework_tus/__init__.py b/rest_framework_tus/__init__.py index c040748..2a14e57 100644 --- a/rest_framework_tus/__init__.py +++ b/rest_framework_tus/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.0.0" +__version__ = "2.0.1" tus_api_version = "1.0.0" tus_api_version_supported = ["1.0.0"] diff --git a/setup.cfg b/setup.cfg index c735911..98257c9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,7 +9,7 @@ max-line-length = 120 exclude = *migrations*, *settings* [bumpversion] -current_version = 2.0.0 +current_version = 2.0.1 commit = True tag = True diff --git a/tox.ini b/tox.ini index 2d655a9..a425272 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,12 @@ [tox] envlist = - {py39,py310,py311}-django32 - {py39,py310,py311}-django40 - {py39,py310,py311}-django41 - {py39,py310,py311}-django42 + {py39,py310,py311}-django{32,40,41,42} + +[gh-actions] +python = + 3.9: py39-django32, py39-django40, py39-django41, py39-django42 + 3.10: py310-django32, py310-django40, py310-django41, py310-django42 + 3.11: py311-django32, py311-django40, py311-django41, py311-django42 [testenv] setenv = @@ -18,7 +21,6 @@ deps = django42: Django>=4.2,<5.0 -r{toxinidir}/requirements_test.txt basepython = - py38: python3.8 py39: python3.9 py310: python3.10 py311: python3.11