Skip to content

Commit 534b0ab

Browse files
committed
Switch to GitHub Actions
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 <stephen@that.guru>
1 parent ff5d3bc commit 534b0ab

File tree

3 files changed

+86
-35
lines changed

3 files changed

+86
-35
lines changed

.github/workflows/ci.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
name: CI
3+
on:
4+
- push
5+
- pull_request
6+
jobs:
7+
lint:
8+
name: Run linters
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout source code
12+
uses: actions/checkout@v2
13+
- name: Set up Python 3.9
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.9
17+
- name: Install dependencies
18+
run: python -m pip install tox
19+
- name: Run tox
20+
run: tox -e style
21+
test:
22+
name: Run unit tests
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
python: [3.6, 3.7, 3.8, 3.9]
27+
steps:
28+
- name: Checkout source code
29+
uses: actions/checkout@v2
30+
- name: Set up Python ${{ matrix.python }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python }}
34+
- name: Install dependencies
35+
run: python -m pip install tox
36+
- name: Run unit tests (via tox)
37+
# Run tox using the version of Python in `PATH`
38+
run: tox -e py
39+
docs:
40+
name: Build docs
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout source code
44+
uses: actions/checkout@v2
45+
with:
46+
fetch-depth: 0
47+
- name: Set up Python 3.9
48+
uses: actions/setup-python@v2
49+
with:
50+
python-version: 3.9
51+
- name: Install dependencies
52+
run: python -m pip install tox
53+
- name: Build docs (via tox)
54+
run: tox -e docs
55+
- name: Archive build results
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: html-docs-build
59+
path: docs/_build/html
60+
retention-days: 7
61+
release:
62+
name: Upload release artifacts
63+
runs-on: ubuntu-latest
64+
needs: test
65+
if: github.event_name == 'push'
66+
steps:
67+
- name: Checkout source code
68+
uses: actions/checkout@v2
69+
with:
70+
fetch-depth: 0
71+
- name: Set up Python 3.9
72+
uses: actions/setup-python@v2
73+
with:
74+
python-version: 3.9
75+
- name: Install dependencies
76+
run: python -m pip install build
77+
- name: Build a binary wheel and a source tarball
78+
run: python -m build --sdist --wheel --outdir dist/ .
79+
- name: Publish distribution to PyPI
80+
if: startsWith(github.ref, 'refs/tags')
81+
uses: pypa/gh-action-pypi-publish@master
82+
with:
83+
password: ${{ secrets.PYPI_API_TOKEN }}

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
sphinx-click
33
============
44

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

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

0 commit comments

Comments
 (0)