]> git.phdru.name Git - mimedecode.git/commitdiff
Merge branch 'github-actions'
authorOleg Broytman <phd@phdru.name>
Sun, 29 Aug 2021 15:16:48 +0000 (18:16 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 29 Aug 2021 15:16:48 +0000 (18:16 +0300)
.github/workflows/run-tests.yaml [new file with mode: 0644]
.travis.yml [deleted file]
tox.ini

diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
new file mode 100644 (file)
index 0000000..efd8361
--- /dev/null
@@ -0,0 +1,34 @@
+name: Run tests
+
+on: [push, pull_request]
+
+jobs:
+  run-tests:
+
+    strategy:
+      matrix:
+        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 'pypy-2.7']
+
+    name: Python ${{ matrix.python-version }}
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Cache pip
+        uses: actions/cache@v2
+        with:
+          # This path is specific to Linux/Unix
+          path: ~/.cache/pip
+          key: ${{ runner.os }}-pip
+      - name: Install dependencies
+        run: |
+          python --version
+          python -m pip install --upgrade "pip<21.0" "setuptools<45" wheel
+          pip --version
+          python -m pip --version
+          python -m pip install --upgrade virtualenv tox tox-gh-actions
+      - name: Run tox targets for ${{ matrix.python-version }}
+        run: python -m tox
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index 54d630d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-os: linux
-
-dist: xenial
-
-language: python
-
-python:
-  - "2.7"
-
-cache: pip
-
-matrix:
-  include:
-  - python: "2.7"
-    env: TOXENV=py27
-  - python: "3.4"
-    env: TOXENV=py34
-  - python: "3.5"
-    env: TOXENV=py35
-  - python: "3.6"
-    env: TOXENV=py36
-  - python: "3.7"
-    env: TOXENV=py37
-  - python: "3.8"
-    env: TOXENV=py38
-  - python: "3.9"
-    env: TOXENV=py39
-  - python: "pypy"
-    env: TOXENV=pypy
-
-install:
-  - travis_retry pip install --upgrade "pip<21" "setuptools<44" tox ppu
-
-script:
-  - tox
-
-before_cache:
-  - scripts/remove-old-files.py -o 180 ~/.cache/pip
diff --git a/tox.ini b/tox.ini
index 85c1d11548f5acf59f33c8377ff2fef860f58674..d428fdafcdf057f9da4e3b853581386a751fcde4 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -24,3 +24,13 @@ commands =
 passenv = HOME
 setenv =
     VIRTUALENV_PIP = 19.1.1
+
+[gh-actions]
+python =
+    2.7: py27
+    3.5: py35
+    3.6: py36
+    3.7: py37
+    3.8: py38
+    3.9: py39
+    pypy-2.7: pypy