]> git.phdru.name Git - mimedecode.git/commitdiff
CI: Github Actions
authorOleg Broytman <phd@phdru.name>
Sun, 29 Aug 2021 14:02:09 +0000 (17:02 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 29 Aug 2021 14:06:58 +0000 (17:06 +0300)
.github/workflows/run-tests.yaml [new file with mode: 0644]
tox.ini

diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
new file mode 100644 (file)
index 0000000..1baf006
--- /dev/null
@@ -0,0 +1,28 @@
+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]
+
+    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: 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/tox.ini b/tox.ini
index 85c1d11548f5acf59f33c8377ff2fef860f58674..ced00e3d6f814bfa18e492e0bb92339f4b1bd319 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -24,3 +24,12 @@ 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