From: Oleg Broytman Date: Sun, 29 Aug 2021 15:16:48 +0000 (+0300) Subject: Merge branch 'github-actions' X-Git-Tag: 3.1.0.post1~6 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=3b4bcf013cd24cfd677f6b87603291708b3781ed;hp=e64759c91f5d780d1af20c3d6210096e859380a9;p=mimedecode.git Merge branch 'github-actions' --- diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 0000000..efd8361 --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -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 index 54d630d..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.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 85c1d11..d428fda 100644 --- 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