Skip to content

Commit 700c274

Browse files
committed
Switch CI to GitHub Actions.
1 parent 5bc7f48 commit 700c274

File tree

6 files changed

+129
-71
lines changed

6 files changed

+129
-71
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: |
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
@@ -25,17 +25,17 @@ notebook2script
2525

2626

2727

28-
.. |travis| image:: https://img.shields.io/travis/com/domdfcoding/notebook2script/master?logo=travis
29-
:target: https://travis-ci.com/domdfcoding/notebook2script
30-
:alt: Travis Build Status
28+
.. |travis| image:: https://github.com/domdfcoding/notebook2script/workflows/Linux%20Tests/badge.svg
29+
:target: https://github.com/domdfcoding/notebook2script/actions?query=workflow%3A%Linux+Tests%22
30+
:alt: Linux Test Status
3131

3232
.. |actions_windows| image:: https://github.com/domdfcoding/notebook2script/workflows/Windows%20Tests/badge.svg
3333
:target: https://github.com/domdfcoding/notebook2script/actions?query=workflow%3A%22Windows+Tests%22
34-
:alt: Windows Tests Status
34+
:alt: Windows Test Status
3535

3636
.. |actions_macos| image:: https://github.com/domdfcoding/notebook2script/workflows/macOS%20Tests/badge.svg
3737
:target: https://github.com/domdfcoding/notebook2script/actions?query=workflow%3A%22macOS+Tests%22
38-
:alt: macOS Tests Status
38+
:alt: macOS Test Status
3939

4040
.. |requires| image:: https://requires.io/github/domdfcoding/notebook2script/requirements.svg?branch=master
4141
:target: https://requires.io/github/domdfcoding/notebook2script/requirements/?branch=master

tox.ini

Lines changed: 2 additions & 2 deletions
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
@@ -121,7 +121,7 @@ commands =
121121
[flake8]
122122
max-line-length = 120
123123
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
124-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py
124+
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
125125
rst-directives =
126126
TODO
127127
envvar

0 commit comments

Comments
 (0)