Skip to content

Commit

Permalink
Merge pull request #21 from terencehonles/update-to-GitHub-actions
Browse files Browse the repository at this point in the history
add GitHub actions config to replace Travis CI
  • Loading branch information
jonascj committed Apr 24, 2021
2 parents 774dcdb + 3297a18 commit 5f3ab20
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 132 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: Test Python ${{ matrix.python-version }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- '2.7'
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- 'pypy-2.7'
- 'pypy-3.7'

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-test-python-${{ matrix.python-version }}-${{ hashFiles('**/tox.ini', '**/setup.*') }}
restore-keys: |
pip-test-python-${{ matrix.python-version }}-${{ hashFiles('**/tox.ini', '**/setup.*') }}
pip-test-python-${{ matrix.python-version }}
pip-test-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-gh-actions
- name: Tox tests
run: |
tox
97 changes: 0 additions & 97 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ Easy thumbnails in Sphinx documentation (focused on HTML).
* `Documentation <https://sphinxcontrib-images.readthedocs.io>`_
* `Repository (GitHub) <https://github.com/sphinx-contrib/images/>`_
* `PyPI <https://pypi.python.org/pypi/sphinxcontrib-images/>`_
* `TravisCI <https://travis-ci.com/sphinx-contrib/images>`_
* `GitHub actions <https://github.com/sphinx-contrib/images/actions/workflows/ci.yml>`_

.. image:: https://api.travis-ci.com/sphinx-contrib/images.svg?branch=master
:target: https://travis-ci.com/sphinx-contrib/images
.. image:: https://github.com/sphinx-contrib/images/actions/workflows/ci.yml/badge.svg
:target: https://github.com/sphinx-contrib/images/actions/workflows/ci.yml
:alt: GitHub Actions

Features
--------
Expand Down
19 changes: 1 addition & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
import sys
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand


class Tox(TestCommand):
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import tox
errno = tox.cmdline()
sys.exit(errno)


setup(
Expand Down Expand Up @@ -51,6 +35,7 @@ def run_tests(self):
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Documentation',
],
entry_points={
Expand All @@ -69,7 +54,5 @@ def run_tests(self):
install_requires=['sphinx>=1.8.5,<2.0;python_version<"3.0"',
'sphinx>=2.0;python_version>="3.0"',
'requests>2.2,<3'],
tests_require=['tox==3.2.1'],
cmdclass = {'test': Tox},
namespace_packages=['sphinxcontrib'],
)
33 changes: 19 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
[tox]
envlist = {py35,py36,py37,py38,py39,pypy3}-sphinx{201,212,222,231,244,300,321}, {py27, pypy}-sphinx{185}
envlist =
{py35,py36,py37,py38,py39,pypy3}-sphinx{201,212,222,231,244,300,321,latest}
{py27, pypy2}-sphinx{185}

[testenv]
minversion = 3.15.0
whitelist_externals = make
basepython =
py27: python2.7
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
pypy: pypy
pypy3: pypy3
commands =
./setup.py bdist_wheel
./setup.py install
make -C docs html
./setup.py bdist_wheel
./setup.py install
make -C docs html
deps =
pip
setuptools
wheel
sphinx-rtd-theme==0.1.6
sphinx185: sphinx==1.8.5
sphinx201: sphinx==2.0.1
Expand All @@ -29,3 +22,15 @@ deps =
sphinx244: sphinx==2.4.4
sphinx300: sphinx==3.0.0
sphinx321: sphinx==3.2.1
sphinxlatest: sphinx
wheel

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38
3.9: py39
pypy-2: pypy2
pypy-3: pypy3

0 comments on commit 5f3ab20

Please sign in to comment.