From 68b522ea4a04ae46ba39b633cb616d1ce56abdc2 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 25 Dec 2019 10:29:27 -0500 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=91=B7=20moving=20to=20github=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit thanks @jefftriplett for the example - https://github.com/jefftriplett/python-github-actions-matrix-demo --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bb1718e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: test +on: [push] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + django-version: [1.11, 2.0, 2.1, 2.2, 3.0] + exclude: + # Python 2.7 is only compatible with Django 1.11 + - python-version: 2.7 + django-version: 2.0 + - python-version: 2.7 + django-version: 2.1 + - python-version: 2.7 + django-version: 2.2 + - python-version: 2.7 + django-version: 3.0 + # Python 3.5 is compatible with Django 1.11 to 2.2 but not 3.0 + - python-version: 3.5 + django-version: 3.0 + fail-fast: false + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Run Tests + run: | + echo "${{ matrix.python-version }} -> ${{ matrix.django-version }}" + pip install -U pip + pip install "Django~=${{ matrix.django-version }}.0" . + python test_dj_database_url.py diff --git a/.gitignore b/.gitignore index ca5c13b..7b49b47 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ docs/_build/ # Virtualenv env/ +.vscode/ From 7db1c32e4df12f3b0a2d1f6b04918dd32c1ccdf5 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 25 Dec 2019 10:33:50 -0500 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=91=B7=20tweak=20ci=20build=20for=20r?= =?UTF-8?q?eadability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb1718e..1a33788 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,13 +23,18 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Run Tests + + - name: Install dependencies run: | - echo "${{ matrix.python-version }} -> ${{ matrix.django-version }}" pip install -U pip pip install "Django~=${{ matrix.django-version }}.0" . + + - name: Run Tests + run: | + echo "$(python --version) / Django $(django-admin --version)" python test_dj_database_url.py From c01081bd450caa878c37bd207e5951491d706f8b Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 25 Dec 2019 10:39:16 -0500 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=93=9D=20point=20the=20ci=20badge=20a?= =?UTF-8?q?t=20GH=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 03a80f0..a9cf2aa 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ DJ-Database-URL ~~~~~~~~~~~~~~~ -.. image:: https://secure.travis-ci.org/jacobian/dj-database-url.svg?branch=master - :target: http://travis-ci.org/jacobian/dj-database-url +.. image:: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fjacobian%2Fdj-database-url%2Fbadge&style=for-the-badge + :target: https://actions-badge.atrox.dev/jacobian/dj-database-url/goto This simple Django utility allows you to utilize the `12factor `_ inspired From dc2a7263c327d24afc86a2a27ee47b17eb413e24 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 25 Dec 2019 10:40:11 -0500 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=97=83=20add=20Python=203.8=20/=20Dja?= =?UTF-8?q?ngo=203.0=20trove=20classifiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 60 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/setup.py b/setup.py index 30ec8c4..c0356ff 100644 --- a/setup.py +++ b/setup.py @@ -58,37 +58,39 @@ request. Use ``None`` for unlimited persistent connections. from setuptools import setup setup( - name='dj-database-url', - version='0.5.0', - url='https://github.com/kennethreitz/dj-database-url', - license='BSD', - author='Kenneth Reitz', - author_email='me@kennethreitz.com', - description='Use Database URLs in your Django Application.', + name="dj-database-url", + version="0.5.0", + url="https://github.com/kennethreitz/dj-database-url", + license="BSD", + author="Kenneth Reitz", + author_email="me@kennethreitz.com", + description="Use Database URLs in your Django Application.", long_description=__doc__, - py_modules=['dj_database_url'], + py_modules=["dj_database_url"], zip_safe=False, include_package_data=True, - platforms='any', + platforms="any", classifiers=[ - 'Environment :: Web Environment', - 'Framework :: Django', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 2.1', - 'Framework :: Django :: 2.2', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - ] + "Environment :: Web Environment", + "Framework :: Django", + "Framework :: Django :: 1.11", + "Framework :: Django :: 2.0", + "Framework :: Django :: 2.1", + "Framework :: Django :: 2.2", + "Framework :: Django :: 3.0", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + ], ) From 70ebcfb6db4c03d9513234eb6a13898b8ca317ed Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 25 Dec 2019 10:49:48 -0500 Subject: [PATCH 5/6] =?UTF-8?q?=E2=9E=95=20add=20Django=20as=20an=20explic?= =?UTF-8?q?it=20dependency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #122 --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c0356ff..3055e35 100644 --- a/setup.py +++ b/setup.py @@ -60,13 +60,14 @@ from setuptools import setup setup( name="dj-database-url", version="0.5.0", - url="https://github.com/kennethreitz/dj-database-url", + url="https://github.com/jacobian/dj-database-url", license="BSD", author="Kenneth Reitz", author_email="me@kennethreitz.com", description="Use Database URLs in your Django Application.", long_description=__doc__, py_modules=["dj_database_url"], + install_requires=["Django>1.11"], zip_safe=False, include_package_data=True, platforms="any", From 306ee25cc0712548f058e53e56acd663c1825e54 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 25 Dec 2019 10:50:14 -0500 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9C=85=20run=20tests=20with=20python=20-?= =?UTF-8?q?m=20unittest=20discover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- Makefile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a33788..a2d42f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,4 +37,4 @@ jobs: - name: Run Tests run: | echo "$(python --version) / Django $(django-admin --version)" - python test_dj_database_url.py + python -m unittest discover diff --git a/Makefile b/Makefile deleted file mode 100644 index 0249649..0000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -test: - python test_dj_database_url.py \ No newline at end of file