Merge pull request #88 from pimoroni/actions
authorPhilip Howard <phil@pimoroni.com>
Sat, 14 Nov 2020 17:41:24 +0000 (17:41 +0000)
committerGitHub <noreply@github.com>
Sat, 14 Nov 2020 17:41:24 +0000 (17:41 +0000)
Add GitHub actions workflow

.github/workflows/test.yml [new file with mode: 0644]
.travis.yml [deleted file]

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644 (file)
index 0000000..d8187f0
--- /dev/null
@@ -0,0 +1,37 @@
+name: Python Tests
+
+on:
+  pull_request:
+  push:
+    branches:
+      - master
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python: [2.7, 3.4, 3.5, 3.7, 3.8]
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Python ${{ matrix.python }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python }}
+      - name: Install Dependencies
+        run: |
+          python -m pip install --upgrade setuptools tox
+      - name: Run Tests
+        working-directory: library
+        run: |
+          tox -e py
+      - name: Coverage
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        working-directory: library
+        run: |
+          python -m pip install coveralls
+          coveralls
+        if: ${{ matrix.python == '3.8' }}
+
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index 79decd6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-language: python
-sudo: false
-cache: pip
-
-git:
-  submodules: true
-
-matrix:
-  include:
-    - python: "2.7"
-      env: TOXENV=py27
-    - python: "3.5"
-      env: TOXENV=py35
-
-install:
-  - pip install --ignore-installed --upgrade setuptools pip tox coveralls
-
-script:
-  - cd library
-  - tox -vv
-
-after_success: if [ "$TOXENV" == "py35" ]; then coveralls; fi
-
-notifications:
-  email: false