]> git.phdru.name Git - m_librarian.git/commitdiff
CI: Migrate from Travis CI to Github Actions
authorOleg Broytman <phd@phdru.name>
Sun, 29 Aug 2021 15:33:09 +0000 (18:33 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 30 Aug 2021 00:02:43 +0000 (03:02 +0300)
.github/workflows/run-tests.yaml [new file with mode: 0644]
.travis.yml [deleted file]
docs-ru/news.rst
docs/news.rst
tox.ini

diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml
new file mode 100644 (file)
index 0000000..3e290db
--- /dev/null
@@ -0,0 +1,44 @@
+name: Run tests
+
+on: [push, pull_request]
+
+jobs:
+  run-tests:
+
+    strategy:
+      matrix:
+        os: [ubuntu-latest, macos-latest, windows-latest]
+        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
+        include:
+        - os: ubuntu-latest
+          os-name: Linux
+          pip-cache-path: ~/.cache/pip
+        - os: macos-latest
+          os-name: OSX
+          pip-cache-path: ~/Library/Caches/pip
+        - os: windows-latest
+          os-name: w32
+          pip-cache-path: ~\AppData\Local\pip\Cache
+
+    name: Python ${{ matrix.python-version }} @ ${{ matrix.os-name }}
+    runs-on: ${{ matrix.os }}
+
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Cache pip
+        uses: actions/cache@v2
+        with:
+          path: ${{ matrix.pip-cache-path }}
+          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 ec960ba..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.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: "2.7"
-    env: TOXENV=py27-flake8
-  - python: "3.9"
-    env: TOXENV=py39-flake8
-
-install:
-  - travis_retry pip install --upgrade "pip<21" "setuptools<44" "tox>=3.15" ppu
-
-script:
-  - tox
-
-before_cache:
-  - remove-old-files.py -o 180 ~/.cache/pip
index ad2506169388c41296eb816dc9b3bc48a44485d0..62db28d1596b18e90d3b0e98689ab9b9f70a5c72 100644 (file)
 
 * Улучшение в web-интерфейсе: сделана ссылка на корень.
 
+* GitHub Actions.
+
+* Перестали использовать Travis CI.
+
 Версия 0.1.5 (2019-02-01)
 -------------------------
 
index 62e8ea9b31abdbeba701460151d8cf083469a620..8b8b2d0dbd78fb24df3dea18621516fd78854f0b 100644 (file)
@@ -1,7 +1,7 @@
 News
 ====
 
-Version 0.1.6 (2020-12-??)
+Version 0.1.6 (2021-08-??)
 --------------------------
 
 * Store lock file in a shared directory; use ``$UID`` as a suffix
@@ -9,6 +9,10 @@ Version 0.1.6 (2020-12-??)
 
 * Enhancement in web-ui: added a link to the root.
 
+* GitHub Actions.
+
+* Stop testing at Travis CI.
+
 Version 0.1.5 (2019-02-01)
 --------------------------
 
diff --git a/tox.ini b/tox.ini
index 4d2880983b24ce3b8978aa0e3b9cadbb2903f705..eb7797c3076c6b82378025b01735ce4ca4e34023 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -19,10 +19,10 @@ deps =
     pip < 19.2
     setuptools < 44
     -rdevscripts/requirements/requirements_tests.txt
-passenv = CI TRAVIS TRAVIS_* APPVEYOR DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR
+passenv = CI APPVEYOR DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR
 setenv =
     VIRTUALENV_PIP = 19.1.1
-platform = linux
+platform = linux|darwin
 
 [testenv:{py27,py34,py35,py36,py37,py38,py39}-sqlite]
 commands =
@@ -45,3 +45,12 @@ deps =
 commands =
     {[testenv]commands}
     flake8
+
+[gh-actions]
+python =
+    2.7: py27
+    3.5: py35
+    3.6: py36
+    3.7: py37
+    3.8: py38
+    3.9: py39