From 0f713a2ca132e0ea76175f9ce9d9c0271569fc6f Mon Sep 17 00:00:00 2001
From: Steve Jalim <stevejalim@mozilla.com>
Date: Sun, 30 Jan 2022 17:46:54 +0000
Subject: [PATCH 1/4] Drop use of Travis CI from the project

---
 .travis.yml | 28 ----------------------------
 README.rst  |  4 +---
 2 files changed, 1 insertion(+), 31 deletions(-)
 delete mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a33d7fd..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: python
-python: 3.9
-dist: focal
-matrix:
-  include:
-    - python: 3.9
-      env: TOXENV=py39-dj22,py39-dj32,flake8
-    - python: 3.8
-      env: TOXENV=py38-dj22,py38-dj32,flake8
-    - python: 3.7
-      sudo: true
-      env: TOXENV=py37-dj22,py37-dj32,flake8
-install:
-  - travis_retry pip install tox
-script: tox
-before_deploy:
-  - .tox/py39-dj32/bin/python updatejson.py
-deploy:
-  provider: pypi
-  distributions: "sdist bdist_wheel"
-  user: pmclanahan
-  skip_cleanup: true
-  password:
-    secure: GcjqfBaQPZ7zVv8RsvlihgUaELNp+4X9fdzAF5isjz8MannFIAQHbY25fVrhZSbTNNwxoyzQZEwVhRScBXfAObq2f3FCtYPh6J6u391mqWh8XjbI6QNBUal0hAhRWJpLmt/jKcIDZefON1PHPoJsadEKWOU8b/KsraWlWSG9dCg=
-  on:
-    tags: true
-    repo: mozilla/django-product-details
-    python: 3.9
diff --git a/README.rst b/README.rst
index a7d9278..341f610 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
 Mozilla Product Details for Django
 ==================================
 
-|Travis| |PyPI|
+|PyPI|
 
 **Mozilla Product Details** is a
 `library <http://viewvc.svn.mozilla.org/vc/libs/product-details/README?view=markup>`__
@@ -202,8 +202,6 @@ versions of Python available, install ``nose``, ``mock``, ``requests``,
 ``responses`` and ``Django`` (see ``tox.ini``'s ``deps``) and run the
 tests in your current Python version by running ``./runtests.py``.
 
-.. |Travis| image:: https://img.shields.io/travis/mozilla/django-product-details.svg
-   :target: https://travis-ci.org/mozilla/django-product-details/
 .. |PyPI| image:: https://img.shields.io/pypi/v/django-mozilla-product-details.svg
    :target: https://pypi.python.org/pypi/django-mozilla-product-details
 

From d16a19b7f58b843553c4fe251a2abde7a86d454f Mon Sep 17 00:00:00 2001
From: Steve Jalim <stevejalim@mozilla.com>
Date: Sun, 30 Jan 2022 17:47:16 +0000
Subject: [PATCH 2/4] Add working config for running tox with Github Actions

This changeset retains the ability to run tox locally (with its breadth of
coverage) while also leveraging GH Actions as the CI runner.

To ensure we had appropriate versions of Python available, we've gone with
the matrix approach at the GHA level, and then taking advantage of the way
that tox will gracefully handle the absence of a particular python version
and keep going.

This does mean that GH tries to run tox for all versions in each python
env, but it's so fast that it should not be a blocker. It does make the
output in CI a bit harder to scan, though

Also, note that Python 3.8 is currently the default version and so is
available in all GHA envs we're using, which means that the 3.8 tests
are run every time along with the specific 3.7, 3.9 or pypy tests. We
could comment it out, but then it leaves a gap if/when GHA moves to 3.9
as the default.
---
 .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++
 tox.ini                  |  7 +++----
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 .github/workflows/ci.yml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..bd1afa2
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,26 @@
+name: "Run tests in CI"
+on: [push]
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version:
+          - "3.7"
+          - "3.8"
+          - "3.9"
+          - "pypy-3.7"
+          - "pypy-3.8"
+    name: Python ${{ matrix.python-version }} in use
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        with:
+          # Note that all envs will have the default version of Python available,
+          # too. This is 3.8 at time of writing.
+          python-version: ${{ matrix.python-version }}
+          architecture: "x64" # optional x64 (default) or x86.
+      - name: Install tox
+        run: pip install tox
+      - name: Run tox
+        run: tox
diff --git a/tox.ini b/tox.ini
index 979f871..6e29827 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,10 +14,9 @@ deps =
     dj32: Django>=3.2,<4.0
 
     nose==1.3.7
-
-    py{37,38,39,py3}: mock==4.0.3
-    py{37,38,39,py3}: responses==0.15.0
-    py{37,38,39,py3}: requests==2.26.0
+    mock==4.0.3
+    responses==0.15.0
+    requests==2.26.0
 
 [testenv:flake8]
 deps = flake8 

From 4505cf9b34c51aca107fc304d7072bd343ed0128 Mon Sep 17 00:00:00 2001
From: Steve Jalim <stevejalim@mozilla.com>
Date: Mon, 31 Jan 2022 12:58:04 +0000
Subject: [PATCH 3/4] Reinstate CI status badge to README

---
 .github/workflows/ci.yml | 2 +-
 README.rst               | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bd1afa2..07ea111 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: "Run tests in CI"
+name: "CI" # Note that this name appears in the README's badge
 on: [push]
 jobs:
   build:
diff --git a/README.rst b/README.rst
index 341f610..17c762e 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
 Mozilla Product Details for Django
 ==================================
 
-|PyPI|
+|GHACI| |PyPI|
 
 **Mozilla Product Details** is a
 `library <http://viewvc.svn.mozilla.org/vc/libs/product-details/README?view=markup>`__
@@ -205,6 +205,9 @@ tests in your current Python version by running ``./runtests.py``.
 .. |PyPI| image:: https://img.shields.io/pypi/v/django-mozilla-product-details.svg
    :target: https://pypi.python.org/pypi/django-mozilla-product-details
 
+.. |GHACI| image:: https://github.com/mozilla/django-product-details/actions/workflows/ci.yml/badge.svg
+   :target: https://github.com/mozilla/django-product-details/actions
+
 Releasing
 ---------
 

From 3a56be4291647c3ecf41483b8e3d0b6d1addb410 Mon Sep 17 00:00:00 2001
From: Steve Jalim <stevejalim@mozilla.com>
Date: Mon, 31 Jan 2022 13:03:42 +0000
Subject: [PATCH 4/4] Bump version, update README

---
 README.rst                  | 5 +++++
 product_details/__init__.py | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/README.rst b/README.rst
index 17c762e..3e787a3 100644
--- a/README.rst
+++ b/README.rst
@@ -220,6 +220,11 @@ Releasing
 Change Log
 ----------
 
+1.0.2 - 2022-01-31
+~~~~~~~~~~~~~~~~~~
+
+- Move CI to Github Actions. Thanks stevejalim!
+
 1.0.1 - 2022-01-13
 ~~~~~~~~~~~~~~~~~~
 
diff --git a/product_details/__init__.py b/product_details/__init__.py
index 5fee144..2d051a3 100644
--- a/product_details/__init__.py
+++ b/product_details/__init__.py
@@ -10,7 +10,7 @@ class MissingJSONData(IOError):
     pass
 
 
-__version__ = "1.0.1"
+__version__ = "1.0.2"
 __all__ = ["__version__", "product_details", "version_compare"]
 
 log = logging.getLogger("product_details")