Skip to content

Commit 87cd421

Browse files
committed
Switch CI to GitHub Actions.
1 parent 8818e05 commit 87cd421

File tree

7 files changed

+133
-75
lines changed

7 files changed

+133
-75
lines changed

.github/workflows/python_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
matrix:
2020
python-version: ["3.6","3.7","3.8","3.9"]
2121

22-
2322
steps:
2423
- name: Checkout 🛎️
2524
uses: "actions/checkout@v2"
@@ -34,5 +33,6 @@ jobs:
3433
python -m pip install --upgrade pip setuptools wheel
3534
python -m pip install --upgrade tox tox-gh-actions virtualenv
3635
36+
3737
- name: "Run Tests for Python ${{ matrix.python-version }}"
3838
run: "python -m tox"
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Linux Tests
4+
5+
on:
6+
push:
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
tests:
12+
name: "Python ${{ matrix.python-version }}"
13+
runs-on: "ubuntu-18.04"
14+
env:
15+
USING_COVERAGE: '3.6,3.7,3.8,3.9'
16+
17+
strategy:
18+
fail-fast: False
19+
matrix:
20+
python-version: ["3.6","3.7","3.8","3.9"]
21+
22+
steps:
23+
- name: Checkout 🛎️
24+
uses: "actions/checkout@v2"
25+
- name: Setup Python 🐍
26+
uses: "actions/setup-python@v2"
27+
with:
28+
python-version: "${{ matrix.python-version }}"
29+
- name: Install dependencies 🔧
30+
run: |
31+
python -VV
32+
python -m site
33+
python -m pip install --upgrade pip setuptools wheel
34+
python -m pip install --upgrade tox tox-gh-actions virtualenv
35+
python -m pip install --upgrade coverage_pyver_pragma
36+
37+
- name: "Run Tests for Python ${{ matrix.python-version }}"
38+
run: "python -m tox"
39+
40+
41+
- name: "Upload Coverage"
42+
uses: actions/upload-artifact@v2
43+
with:
44+
name: "coverage-${{ matrix.python-version }}"
45+
path: .coverage
46+
47+
48+
Coverage:
49+
needs: tests
50+
runs-on: "ubuntu-18.04"
51+
steps:
52+
- name: Checkout 🛎️
53+
uses: "actions/checkout@v2"
54+
55+
- name: Setup Python 🐍
56+
uses: "actions/setup-python@v2"
57+
with:
58+
python-version: 3.8
59+
60+
- name: Install dependencies 🔧
61+
run: |
62+
python -m pip install --upgrade pip setuptools wheel
63+
python -m pip install --upgrade coveralls coverage_pyver_pragma
64+
65+
- name: "Download Coverage"
66+
uses: actions/download-artifact@v2
67+
with:
68+
path: coverage
69+
70+
- name: Display structure of downloaded files
71+
run: ls -R
72+
working-directory: coverage
73+
74+
- name: Combine Coverage
75+
run: |block_template.globals["make_actions_linux_shield"]
76+
shopt -s globstar
77+
python -m coverage combine coverage/**/.coverage
78+
79+
- name: "Upload Combined Coverage Aretfact"
80+
uses: actions/upload-artifact@v2
81+
with:
82+
name: "combined-coverage"
83+
path: .coverage
84+
85+
- name: "Upload Combined Coverage to Coveralls"
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
run: |
89+
coveralls
90+
91+
Deploy:
92+
needs: tests
93+
94+
runs-on: "ubuntu-18.04"
95+
steps:
96+
- name: Checkout 🛎️
97+
uses: "actions/checkout@v2"
98+
99+
- name: Setup Python 🐍
100+
uses: "actions/setup-python@v2"
101+
with:
102+
python-version: 3.8
103+
104+
- name: Install dependencies 🔧
105+
run: |
106+
python -m pip install --upgrade pip setuptools wheel
107+
python -m pip install --upgrade tox
108+
109+
- name: Build distributions 📦
110+
run: |
111+
tox -e build
112+
113+
114+
- name: Upload distribution 📦 to PyPI
115+
if: startsWith(github.ref, 'refs/tags/')
116+
uses: pypa/gh-action-pypi-publish@master
117+
with:
118+
user: __token__
119+
password: ${{ secrets.PYPI_TOKEN }}
120+
skip_existing: true

.github/workflows/python_ci_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
matrix:
2020
python-version: ["3.6","3.7","3.8","3.9"]
2121

22-
2322
steps:
2423
- name: Checkout 🛎️
2524
uses: "actions/checkout@v2"
@@ -34,5 +33,6 @@ jobs:
3433
python -m pip install --upgrade pip setuptools wheel
3534
python -m pip install --upgrade tox tox-gh-actions virtualenv
3635
36+
3737
- name: "Run Tests for Python ${{ matrix.python-version }}"
3838
run: "python -m tox"

.travis.yml

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

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ sphinx-autofixture
3434
:target: https://github.com/domdfcoding/sphinx-autofixture/actions?query=workflow%3A%22Docs+Check%22
3535
:alt: Docs Check Status
3636

37-
.. |travis| image:: https://img.shields.io/travis/com/domdfcoding/sphinx-autofixture/master?logo=travis
38-
:target: https://travis-ci.com/domdfcoding/sphinx-autofixture
39-
:alt: Travis Build Status
37+
.. |travis| image:: https://github.com/domdfcoding/sphinx-autofixture/workflows/Linux%20Tests/badge.svg
38+
:target: https://github.com/domdfcoding/sphinx-autofixture/actions?query=workflow%3A%Linux+Tests%22
39+
:alt: Linux Test Status
4040

4141
.. |actions_windows| image:: https://github.com/domdfcoding/sphinx-autofixture/workflows/Windows%20Tests/badge.svg
4242
:target: https://github.com/domdfcoding/sphinx-autofixture/actions?query=workflow%3A%22Windows+Tests%22
43-
:alt: Windows Tests Status
43+
:alt: Windows Test Status
4444

4545
.. |actions_macos| image:: https://github.com/domdfcoding/sphinx-autofixture/workflows/macOS%20Tests/badge.svg
4646
:target: https://github.com/domdfcoding/sphinx-autofixture/actions?query=workflow%3A%22macOS+Tests%22
47-
:alt: macOS Tests Status
47+
:alt: macOS Test Status
4848

4949
.. |requires| image:: https://requires.io/github/domdfcoding/sphinx-autofixture/requirements.svg?branch=master
5050
:target: https://requires.io/github/domdfcoding/sphinx-autofixture/requirements/?branch=master

doc-source/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ sphinx-autofixture
3333
:workflow: Docs Check
3434
:alt: Docs Check Status
3535

36-
.. |travis| travis-shield::
37-
:travis-site: com
38-
:alt: Travis Build Status
36+
.. |travis| actions-shield::
37+
:workflow: Linux Tests
38+
:alt: Linux Test Status
3939

4040
.. |actions_windows| actions-shield::
4141
:workflow: Windows Tests
42-
:alt: Windows Tests Status
42+
:alt: Windows Test Status
4343

4444
.. |actions_macos| actions-shield::
4545
:workflow: macOS Tests
46-
:alt: macOS Tests Status
46+
:alt: macOS Test Status
4747

4848
.. |requires| requires-io-shield::
4949
:alt: Requirements Status

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ python =
3737

3838
[gh-actions]
3939
python =
40-
3.6: py36, build
40+
3.6: py36, build, mypy
4141
3.7: py37, build
4242
3.8: py38, build
4343
3.9: py39, build

0 commit comments

Comments
 (0)