Repository: peterjc/flake8-sfs (language: python)

Issue:
Replace TravisCI for continuous integration testing
Path of least resistance would be CircleCI since I am familiar with that, else GitHub actions...


Discussion / hints:
Cross reference https://github.com/peterjc/flake8-rst-docstrings/pull/41 and https://github.com/peterjc/flake8-black/issues/34 (sister projects adopting GitHub actions)

Fix patch:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 52a0398..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# This is a special configuration file to run tests on Travis-CI via
-# GitHub notifications when changes are committed.
-#
-# For technical details, see http://travis-ci.org/
-
-language: python
-cache: pip
-jobs:
-  include:
-    - stage: test
-      python: "3.6"
-    - stage: test
-      python: "3.7"
-    - stage: test
-      python: "3.8"
-
-before_install:
- - "if grep '\t' *.py *.rst; then echo 'Tabs are bad, please use four spaces.'; false; fi"
- - "if grep -n -r '[[:blank:]]$' *.py *.rst; then echo 'Please remove trailing whitespace.'; false; fi"
- - pip install --upgrade pip setuptools
- - pip install flake8 flake8-black restructuredtext-lint pygments
- - echo "Using restructuredtext-lint to check documentation"
- - restructuredtext-lint *.rst
- - echo "Using flake8 to check Python code"
- - flake8 setup.py flake8_sfs.py
-
-install:
- - python setup.py install
-
-script:
- - echo "On this machine \$LANG=$LANG"
- - cd tests/
- - ./run_tests.sh
-
-notifications:
-  email: false
diff --git a/README.rst b/README.rst
index 0580017..b80c6ff 100644
--- a/README.rst
+++ b/README.rst
@@ -10,9 +10,9 @@ flake8-sfs - Python String Formatting Style Plugin
 .. image:: https://results.pre-commit.ci/badge/github/peterjc/flake8-sfs/master.svg
    :target: https://results.pre-commit.ci/latest/github/peterjc/flake8-sfs/master
    :alt: pre-commit.ci status
-.. image:: https://img.shields.io/travis/peterjc/flake8-sfs/master.svg
-   :alt: Testing with TravisCI
-   :target: https://travis-ci.org/peterjc/flake8-sfs/branches
+.. image:: https://img.shields.io/github/workflow/status/peterjc/flake8-sfs/test?logo=github-actions
+   :alt: GitHub workflow status
+   :target: https://github.com/peterjc/flake8-sfs/actions
 .. image:: https://img.shields.io/pypi/dm/flake8-sfs.svg
    :alt: PyPI downloads
    :target: https://pypistats.org/packages/flake8-sfs
@@ -189,7 +189,7 @@ Developers
 
 This plugin is on GitHub at https://github.com/peterjc/flake8-sfs
 
-To make a new release once tested locally and on TravisCI::
+To make a new release once tested locally and online::
 
     $ git tag vX.Y.Z
     $ python setup.py sdist --formats=gztar


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..01e6219
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,26 @@
+name: test
+
+on: [push, pull_request]
+
+jobs:
+  run-tests:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install package
+      run: |
+        python setup.py install
+        flake8 --version
+    - name: Run tests
+      run: |
+        cd tests/
+        echo "On this machine \$LANG=$LANG"
+        bash ./run_tests.sh