Skip to content

Commit

Permalink
Switch to GitHub Actions
Browse files Browse the repository at this point in the history
Travis has imposed quotas on builds that require us to contact them to
obtain OSS credits. The CI tool is irrelevant so long as builds do
happen, so switch to GitHub Actions for now.

Signed-off-by: Stephen Finucane <[email protected]>
  • Loading branch information
stephenfin committed Nov 4, 2021
1 parent ff5d3bc commit 534b0ab
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 35 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: CI
on:
- push
- pull_request
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: python -m pip install tox
- name: Run tox
run: tox -e style
test:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: python -m pip install tox
- name: Run unit tests (via tox)
# Run tox using the version of Python in `PATH`
run: tox -e py
docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: python -m pip install tox
- name: Build docs (via tox)
run: tox -e docs
- name: Archive build results
uses: actions/upload-artifact@v2
with:
name: html-docs-build
path: docs/_build/html
retention-days: 7
release:
name: Upload release artifacts
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push'
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: python -m pip install build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
sphinx-click
============

.. image:: https://travis-ci.org/click-contrib/sphinx-click.svg?branch=master
:target: https://travis-ci.org/click-contrib/sphinx-click
:alt: CI Status
.. image:: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml/badge.svg
:target: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml
:alt: Build Status

.. image:: https://readthedocs.org/projects/sphinx-click/badge/?version=latest
:target: https://sphinx-click.readthedocs.io/en/latest/?badge=latest
Expand Down

0 comments on commit 534b0ab

Please sign in to comment.