From: Oleg Broytman Date: Wed, 22 Sep 2021 23:51:32 +0000 (+0300) Subject: CI: Migrate from Travis CI and AppVeyor to GitHub Actions X-Git-Tag: 0.8.0~2^2~1 X-Git-Url: https://git.phdru.name/?p=ppu.git;a=commitdiff_plain;h=301159bf5b621dcdde12d8c1ff263ee5c98051f4 CI: Migrate from Travis CI and AppVeyor to GitHub Actions --- diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 0000000..c1d6c40 --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -0,0 +1,56 @@ +name: Run tests + +on: [push, pull_request] + +jobs: + run-tests: + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 'pypy-2.7'] + include: + - os: ubuntu-latest + os-name: Linux + pip-cache-path: ~/.cache/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 + pip install --upgrade virtualenv tox + - name: Set TOXENV + run: | + import os, sys + if hasattr(sys, 'pypy_version_info'): + toxenv = 'pypy' + else: + pyver = '%d%d' % tuple(sys.version_info[:2]) + toxenv = 'py%s' % pyver + if os.name == 'posix': + toxenv += ',py%s-flake8' % pyver + with open(os.environ['GITHUB_ENV'], 'a') as f: + f.write('TOXENV=' + toxenv + '\n') + shell: python + - name: Run tox + run: | + python -c "import os; print(os.environ['TOXENV'])" + tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8bd44ba..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" - -script: - - tox - -before_cache: - - scripts/remove-old-files.py -o 180 ~/.cache/pip diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 605635b..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,78 +0,0 @@ -# Test on windows -# Heavily inspired by Oliver Grisel's appveyor-demo (https://github.com/ogrisel/python-appveyor-demo) -version: '{branch}-{build}' - -cache: - - '%LOCALAPPDATA%\pip\Cache' - -# Match travis -clone_depth: 50 - -environment: - matrix: - - TOXENV: "py27" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python27" - - TOXENV: "py36" - PYTHON_VERSION: "3.6" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python36" - - TOXENV: "py36" - PYTHON_VERSION: "3.6" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python36-x64" - - TOXENV: "py37" - PYTHON_VERSION: "3.7" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python37" - - TOXENV: "py37" - PYTHON_VERSION: "3.7" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python37-x64" - - TOXENV: "py38" - PYTHON_VERSION: "3.8" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python38" - - TOXENV: "py38" - PYTHON_VERSION: "3.8" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python38-x64" - - TOXENV: "py39" - PYTHON_VERSION: "3.9" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python39" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - TOXENV: "py39" - PYTHON_VERSION: "3.9" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python39-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - TOXENV: "py27-flake8" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python27" - - TOXENV: "py39-flake8" - PYTHON_VERSION: "3.9" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python39-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - -install: - # Ensure we use the right python version - - "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%" - - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe" - - "python --version" - - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - - "python -m pip install --upgrade \"pip<21\" \"setuptools<44\"" - - "pip install --upgrade \"tox>=3.15\" ppu" - - "pip --version" - -# No build step - we don't have C extensions -build: false - -test_script: - - "tox" - -after_test: - - "scripts\\remove-old-files.py -o 180 %LOCALAPPDATA%\\pip\\Cache" diff --git a/docs/news.rst b/docs/news.rst index b1090f0..1e01878 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -6,6 +6,12 @@ Version 0.8.0 (2021-??-??) * Python 3.8, Python 3.9. +* GitHub Actions. + +* Stop testing at Travis CI. + +* Stop testing at AppVeyor. + Version 0.7.0 (2019-02-01) --------------------------