Skip to content

Commit d15447f

Browse files
committed
Use GitHub Actions for tests
- add flake8 test - fix coveralls call - add Windows builds (except PyPy builds) - documentation build remains on Travis - decreases build times by factor 3
1 parent 5ef4a11 commit d15447f

File tree

8 files changed

+144
-82
lines changed

8 files changed

+144
-82
lines changed

.github/workflows/pythontests.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Testsuite
2+
3+
on:
4+
push
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
linter:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
python-version: [3.8]
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Get pip cache dir
24+
id: pip-cache
25+
run: |
26+
echo "::set-output name=dir::$(pip cache dir)"
27+
- name: pip cache
28+
uses: actions/cache@v2
29+
with:
30+
path: ${{ steps.pip-cache.outputs.dir }}
31+
key: py${{ matrix.python-version }}-${{ matrix.os }}-pip
32+
33+
- name: Install linter
34+
run: python -m pip install flake8
35+
- name: Check syntax and style
36+
run: python -m flake8 .
37+
38+
build:
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
os: [ubuntu-latest, windows-latest]
44+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
45+
exclude:
46+
- os: windows-latest
47+
python-version: pypy2
48+
- os: windows-latest
49+
python-version: pypy3
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: Set up Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v2
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
- name: Get pip cache dir
57+
id: pip-cache
58+
run: |
59+
python -m pip install -U pip # to ensure version > 20 to have cache dir
60+
echo "::set-output name=dir::$(pip cache dir)"
61+
- name: pip cache
62+
uses: actions/cache@v2
63+
with:
64+
path: ${{ steps.pip-cache.outputs.dir }}
65+
key: py${{ matrix.python-version }}-${{ matrix.os }}-pip
66+
- name: Test environment setup
67+
run: |
68+
python -m pip install wheel
69+
python -m pip install pytest coveralls tox
70+
- name: Run tests
71+
run: |
72+
TOX_PYTHON_VERSION=$(if [ ${{ matrix.python-version }} = pypy2 ]; then echo "pypy2"; elif [ ${{ matrix.python-version }} = pypy3 ]; then echo "pypy3"; else echo py${{ matrix.python-version }} | tr -d .; fi)
73+
tox -e $(tox -l | grep $TOX_PYTHON_VERSION | paste -sd "," -)
74+
- name: Get coverage results
75+
if: ${{ success() && matrix.python-version == 3.8 }}
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
run: coveralls
79+
80+

.travis.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
dist: xenial
22
language: python
3-
python:
4-
- "2.7"
5-
- "3.5"
6-
- "3.6"
7-
- "3.7"
8-
- "3.8"
9-
- "3.9-dev"
10-
- "pypy"
11-
- "pypy3"
123
env:
134
global:
145
secure: T6vjQsfhlpCwD0dsVZxDbUD5rvqiOz27ex3nwGvVFWnu0ospPbqzw1MqZcjyFvwcLWF+TrJbVf7UxxTM4JHESZTwcSQ1zXhzZ/pRhCKRa7q7fbVkMptEuarUVmnZZAs9GqZecetCA+ka5dSlHEJdIZwyHRmGV8hOx2w/OHRLEJTpSxT7NTkoKTATPxEzseAup1cJ47PGpnLQYXc0H2DgedgUqboU35Rkbya38gptKqFJJ8K3VuCr+j91Pq/rTntMIND3OsBkzPF1PE08tC15G9bBwRi+nER0BZSfxKkmoTLh7yDJhyyzuTDedaZInCziRYCbhQfsCn8QRCyiVeRiCVt1+/2yNt5lJYZwxpQGyYMOA//zlEDu7Z1uYSnkvy4BkI5g22IrjHLcij1lAaJ3lkafINbcUqlwv4sp/xgT8VXCfiDUadvzm+O9rBo6GlVrgWvdV0ExkSWYDu77ruGHZT3XCZ5ZpTf8OtwX71yHs1o5A5lzfPf1DA+fKPiWsu8jOYlStPn5v81ppqYzIz3JiaWgypCDWB7TLWT6iFjfK5hRWNJQn7aVKx5m86Dtu2cxDdBUDhK8fhbIWAQsdyLMcsXEGK1nekxEK8oM28g0hvifQqS1Up+MXmG6xQg8inbvWuZhwE6cnjDyb5CnaI+KAVxtrhVNlYkv8405fe6XumE=
15-
install:
16-
- pip install tox
17-
- pip install python-coveralls
186
script:
19-
- TOX_PYTHON_VERSION=$(if [ $TRAVIS_PYTHON_VERSION = "pypy" ]; then echo "pypy2"; elif [ $TRAVIS_PYTHON_VERSION = "pypy3" ]; then echo "pypy3"; else echo py$TRAVIS_PYTHON_VERSION | tr -d .; fi)
20-
- tox -e $(tox -l | grep $TOX_PYTHON_VERSION | paste -sd "," -)
21-
after_success:
22-
- coveralls
237
- pip install sphinx
248
- ./build-docs.sh
259
sudo: false

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
### Infrastructure
99
- added automatic documentation build on change
1010
- add Python 3.9, pypy3 and pytest 6.0 and 6.1 to CI builds
11+
- use GitHub Actions for builds, add Windows builds
1112

1213
## [Version 0.7.1](https://pypi.org/project/pytest-order/0.7.1/)
1314
Update after renaming the repository and the package.

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ changed marker name (`order` instead of `run`). Only the `order`
1515
marker is supported, support for all additional markers has been removed for
1616
consistence (see [this issue](https://github.com/ftobia/pytest-ordering/issues/38)).
1717

18+
More information can be found in the documentation:
19+
- for the [latest release](https://mrbean-bremen.github.io/pytest-order/stable/)
20+
- for the [current master](https://mrbean-bremen.github.io/pytest-order/dev/)
21+
1822
_From the original project:_
1923

2024
Have you ever wanted to easily run one of your tests before any others run?
@@ -54,8 +58,3 @@ yields the output:
5458
test_foo.py:3: test_foo PASSED
5559

5660
=========================== 2 passed in 0.01 seconds ===========================
57-
58-
More information can be found in the documentation:
59-
- for the [latest release](https://mrbean-bremen.github.io/pytest-order/stable/)
60-
- for the [current master](https://mrbean-bremen.github.io/pytest-order/dev/)
61-

docs/source/conf.py

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
0, os.path.split(os.path.split(os.path.dirname(os.path.abspath(
2323
__file__)))[0])[0])
2424

25-
from pytest_order import __version__
25+
from pytest_order import __version__ # noqa: E402
2626

2727
# -- General configuration ------------------------------------------------
2828

2929
# If your documentation needs a minimal Sphinx version, state it here.
30-
#needs_sphinx = '1.0'
30+
# needs_sphinx = '1.0'
3131

3232
# Add any Sphinx extension module names here, as strings. They can be
3333
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -47,7 +47,7 @@
4747
source_suffix = '.rst'
4848

4949
# The encoding of source files.
50-
#source_encoding = 'utf-8-sig'
50+
# source_encoding = 'utf-8-sig'
5151

5252
# The master toctree document.
5353
master_doc = 'index'
@@ -68,41 +68,41 @@
6868

6969
# The language for content autogenerated by Sphinx. Refer to documentation
7070
# for a list of supported languages.
71-
#language = None
71+
# language = None
7272

7373
# There are two options for replacing |today|: either, you set today to some
7474
# non-false value, then it is used:
75-
#today = ''
75+
# today = ''
7676
# Else, today_fmt is used as the format for a strftime call.
77-
#today_fmt = '%B %d, %Y'
77+
# today_fmt = '%B %d, %Y'
7878

7979
# List of patterns, relative to source directory, that match files and
8080
# directories to ignore when looking for source files.
8181
exclude_patterns = []
8282

8383
# The reST default role (used for this markup: `text`) to use for all
8484
# documents.
85-
#default_role = None
85+
# default_role = None
8686

8787
# If true, '()' will be appended to :func: etc. cross-reference text.
88-
#add_function_parentheses = True
88+
# add_function_parentheses = True
8989

9090
# If true, the current module name will be prepended to all description
9191
# unit titles (such as .. function::).
92-
#add_module_names = True
92+
# add_module_names = True
9393

9494
# If true, sectionauthor and moduleauthor directives will be shown in the
9595
# output. They are ignored by default.
96-
#show_authors = False
96+
# show_authors = False
9797

9898
# The name of the Pygments (syntax highlighting) style to use.
9999
pygments_style = 'sphinx'
100100

101101
# A list of ignored prefixes for module index sorting.
102-
#modindex_common_prefix = []
102+
# modindex_common_prefix = []
103103

104104
# If true, keep warnings as "system message" paragraphs in the built documents.
105-
#keep_warnings = False
105+
# keep_warnings = False
106106

107107

108108
# -- Options for HTML output ----------------------------------------------
@@ -114,26 +114,26 @@
114114
# Theme options are theme-specific and customize the look and feel of a theme
115115
# further. For a list of options available for each theme, see the
116116
# documentation.
117-
#html_theme_options = {}
117+
# html_theme_options = {}
118118

119119
# Add any paths that contain custom themes here, relative to this directory.
120-
#html_theme_path = []
120+
# html_theme_path = []
121121

122122
# The name for this set of Sphinx documents. If None, it defaults to
123123
# "<project> v<release> documentation".
124-
#html_title = None
124+
# html_title = None
125125

126126
# A shorter title for the navigation bar. Default is the same as html_title.
127-
#html_short_title = None
127+
# html_short_title = None
128128

129129
# The name of an image file (relative to this directory) to place at the top
130130
# of the sidebar.
131-
#html_logo = None
131+
# html_logo = None
132132

133133
# The name of an image file (within the static path) to use as favicon of the
134134
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
135135
# pixels large.
136-
#html_favicon = None
136+
# html_favicon = None
137137

138138
# Add any paths that contain custom static files (such as style sheets) here,
139139
# relative to this directory. They are copied after the builtin static files,
@@ -143,93 +143,92 @@
143143
# Add any extra paths that contain custom files (such as robots.txt or
144144
# .htaccess) here, relative to this directory. These files are copied
145145
# directly to the root of the documentation.
146-
#html_extra_path = []
146+
# html_extra_path = []
147147

148148
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
149149
# using the given strftime format.
150-
#html_last_updated_fmt = '%b %d, %Y'
150+
# html_last_updated_fmt = '%b %d, %Y'
151151

152152
# If true, SmartyPants will be used to convert quotes and dashes to
153153
# typographically correct entities.
154-
#html_use_smartypants = True
154+
# html_use_smartypants = True
155155

156156
# Custom sidebar templates, maps document names to template names.
157-
#html_sidebars = {}
157+
# html_sidebars = {}
158158

159159
# Additional templates that should be rendered to pages, maps page names to
160160
# template names.
161-
#html_additional_pages = {}
161+
# html_additional_pages = {}
162162

163163
# If false, no module index is generated.
164-
#html_domain_indices = True
164+
# html_domain_indices = True
165165

166166
# If false, no index is generated.
167-
#html_use_index = True
167+
# html_use_index = True
168168

169169
# If true, the index is split into individual pages for each letter.
170-
#html_split_index = False
170+
# html_split_index = False
171171

172172
# If true, links to the reST sources are added to the pages.
173-
#html_show_sourcelink = True
173+
# html_show_sourcelink = True
174174

175175
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
176176
html_show_sphinx = False
177177

178178
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
179-
#html_show_copyright = True
179+
# html_show_copyright = True
180180

181181
# If true, an OpenSearch description file will be output, and all pages will
182182
# contain a <link> tag referring to it. The value of this option must be the
183183
# base URL from which the finished HTML is served.
184-
#html_use_opensearch = ''
184+
# html_use_opensearch = ''
185185

186186
# This is the file name suffix for HTML files (e.g. ".xhtml").
187-
#html_file_suffix = None
187+
# html_file_suffix = None
188188

189189
# Output file base name for HTML help builder.
190190
htmlhelp_basename = 'pytest-orderdoc'
191191

192-
193192
# -- Options for LaTeX output ---------------------------------------------
194193

195194
latex_elements = {
196-
# The paper size ('letterpaper' or 'a4paper').
197-
#'papersize': 'letterpaper',
195+
# The paper size ('letterpaper' or 'a4paper').
196+
# 'papersize': 'letterpaper',
198197

199-
# The font size ('10pt', '11pt' or '12pt').
200-
#'pointsize': '10pt',
198+
# The font size ('10pt', '11pt' or '12pt').
199+
# 'pointsize': '10pt',
201200

202-
# Additional stuff for the LaTeX preamble.
203-
#'preamble': '',
201+
# Additional stuff for the LaTeX preamble.
202+
# 'preamble': '',
204203
}
205204

206205
# Grouping the document tree into LaTeX files. List of tuples
207206
# (source start file, target name, title,
208207
# author, documentclass [howto, manual, or own class]).
209208
latex_documents = [
210-
('index', 'pytest-order.tex', u'pytest-order Documentation',
211-
u'Frank Tobia', 'manual'),
209+
('index', 'pytest-order.tex', u'pytest-order Documentation',
210+
u'Frank Tobia', 'manual'),
212211
]
213212

214213
# The name of an image file (relative to this directory) to place at the top of
215214
# the title page.
216-
#latex_logo = None
215+
# latex_logo = None
217216

218217
# For "manual" documents, if this is true, then toplevel headings are parts,
219218
# not chapters.
220-
#latex_use_parts = False
219+
# latex_use_parts = False
221220

222221
# If true, show page references after internal links.
223-
#latex_show_pagerefs = False
222+
# latex_show_pagerefs = False
224223

225224
# If true, show URL addresses after external links.
226-
#latex_show_urls = False
225+
# latex_show_urls = False
227226

228227
# Documents to append as an appendix to all manuals.
229-
#latex_appendices = []
228+
# latex_appendices = []
230229

231230
# If false, no module index is generated.
232-
#latex_domain_indices = True
231+
# latex_domain_indices = True
233232

234233

235234
# -- Options for manual page output ---------------------------------------
@@ -242,7 +241,7 @@
242241
]
243242

244243
# If true, show URL addresses after external links.
245-
#man_show_urls = False
244+
# man_show_urls = False
246245

247246

248247
# -- Options for Texinfo output -------------------------------------------
@@ -251,19 +250,19 @@
251250
# (source start file, target name, title, author,
252251
# dir menu entry, description, category)
253252
texinfo_documents = [
254-
('index', 'pytest-order', u'pytest-order Documentation',
255-
u'Frank Tobia', 'pytest-order', 'One line description of project.',
256-
'Miscellaneous'),
253+
('index', 'pytest-order', u'pytest-order Documentation',
254+
u'Frank Tobia', 'pytest-order', 'One line description of project.',
255+
'Miscellaneous'),
257256
]
258257

259258
# Documents to append as an appendix to all manuals.
260-
#texinfo_appendices = []
259+
# texinfo_appendices = []
261260

262261
# If false, no module index is generated.
263-
#texinfo_domain_indices = True
262+
# texinfo_domain_indices = True
264263

265264
# How to display URL addresses: 'footnote', 'no', or 'inline'.
266-
#texinfo_show_urls = 'footnote'
265+
# texinfo_show_urls = 'footnote'
267266

268267
# If true, do not generate a @detailmenu in the "Top" node's menu.
269-
#texinfo_no_detailmenu = False
268+
# texinfo_no_detailmenu = False

0 commit comments

Comments
 (0)