From: Oleg Broytman Date: Sun, 29 Aug 2021 15:33:09 +0000 (+0300) Subject: CI: Migrate from Travis CI to Github Actions X-Git-Tag: 0.1.6~9^2~3 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e4508c6f74cc2cca194ac879c3e4084c4421f030;p=m_librarian.git CI: Migrate from Travis CI to Github Actions --- diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 0000000..3e290db --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -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 index ec960ba..0000000 --- a/.travis.yml +++ /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 diff --git a/docs-ru/news.rst b/docs-ru/news.rst index ad25061..62db28d 100644 --- a/docs-ru/news.rst +++ b/docs-ru/news.rst @@ -11,6 +11,10 @@ * Улучшение в web-интерфейсе: сделана ссылка на корень. +* GitHub Actions. + +* Перестали использовать Travis CI. + Версия 0.1.5 (2019-02-01) ------------------------- diff --git a/docs/news.rst b/docs/news.rst index 62e8ea9..8b8b2d0 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -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 4d28809..eb7797c 100644 --- 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