Skip to content

Commit 26adcc4

Browse files
authored
Switch to GitHub actions (#417)
* Add github workflow for testing * Add .editorconfig * setup.py -> setup.cfg * Remove .travis.yml * Test on the python python 3.10 (alpha)
1 parent 123cd22 commit 26adcc4

File tree

6 files changed

+104
-72
lines changed

6 files changed

+104
-72
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
12+
[*.py]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.yml]
17+
indent_style = space
18+
indent_size = 2

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Main testing workflow
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.6", "3.7", "3.8", "3.9", 3.10.0-alpha.6]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -U setuptools
26+
pip install tox tox-gh-actions codecov
27+
- name: Test with tox
28+
run: |
29+
tox
30+
codecov

.travis.yml

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

setup.cfg

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1+
[metadata]
2+
name = pytest-bdd
3+
description = BDD for pytest
4+
long_description = file: README.rst, AUTHORS.rst, CHANGES.rst
5+
long_description_content_type = text/x-rst
6+
author = Oleg Pidsadnyi, Anatoly Bubenkov and others
7+
license = MIT license
8+
author_email = [email protected]
9+
url = https://github.com/pytest-dev/pytest-bdd
10+
version = attr: pytest_bdd.__version__
11+
classifiers =
12+
Development Status :: 6 - Mature
13+
Intended Audience :: Developers
14+
License :: OSI Approved :: MIT License
15+
Operating System :: POSIX
16+
Operating System :: Microsoft :: Windows
17+
Operating System :: MacOS :: MacOS X
18+
Topic :: Software Development :: Testing
19+
Topic :: Software Development :: Libraries
20+
Topic :: Utilities
21+
Programming Language :: Python :: 3
22+
Programming Language :: Python :: 3.6
23+
Programming Language :: Python :: 3.7
24+
Programming Language :: Python :: 3.8
25+
Programming Language :: Python :: 3.9
26+
27+
[options]
28+
python_requires = >=3.6
29+
install_requires =
30+
glob2
31+
Mako
32+
parse
33+
parse_type
34+
py
35+
pytest>=4.3
36+
37+
tests_require = tox
38+
packages = pytest_bdd
39+
include_package_data = True
40+
41+
[options.entry_points]
42+
pytest11 =
43+
pytest-bdd = pytest_bdd.plugin
44+
console_scripts =
45+
pytest-bdd = pytest_bdd.scripts:main
46+
147
[bdist_wheel]
248
universal = 1

setup.py

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,3 @@
1-
#!/usr/bin/env python
2-
"""pytest-bdd package config."""
3-
4-
import codecs
5-
import os
6-
import re
7-
81
from setuptools import setup
92

10-
dirname = os.path.dirname(__file__)
11-
12-
long_description = (
13-
codecs.open(os.path.join(dirname, "README.rst"), encoding="utf-8").read()
14-
+ "\n"
15-
+ codecs.open(os.path.join(dirname, "AUTHORS.rst"), encoding="utf-8").read()
16-
)
17-
18-
with codecs.open(os.path.join(dirname, "pytest_bdd", "__init__.py"), encoding="utf-8") as fd:
19-
VERSION = re.compile(r".*__version__ = ['\"](.*?)['\"]", re.S).match(fd.read()).group(1)
20-
21-
setup(
22-
name="pytest-bdd",
23-
description="BDD for pytest",
24-
long_description=long_description,
25-
long_description_content_type="text/x-rst",
26-
author="Oleg Pidsadnyi, Anatoly Bubenkov and others",
27-
license="MIT license",
28-
author_email="[email protected]",
29-
url="https://github.com/pytest-dev/pytest-bdd",
30-
version=VERSION,
31-
classifiers=[
32-
"Development Status :: 6 - Mature",
33-
"Intended Audience :: Developers",
34-
"License :: OSI Approved :: MIT License",
35-
"Operating System :: POSIX",
36-
"Operating System :: Microsoft :: Windows",
37-
"Operating System :: MacOS :: MacOS X",
38-
"Topic :: Software Development :: Testing",
39-
"Topic :: Software Development :: Libraries",
40-
"Topic :: Utilities",
41-
"Programming Language :: Python :: 2",
42-
"Programming Language :: Python :: 3",
43-
]
44-
+ [("Programming Language :: Python :: %s" % x) for x in "3.6 3.7 3.8 3.9".split()],
45-
python_requires=">=3.6",
46-
install_requires=["glob2", "Mako", "parse", "parse_type", "py", "pytest>=4.3"],
47-
# the following makes a plugin available to pytest
48-
entry_points={
49-
"pytest11": ["pytest-bdd = pytest_bdd.plugin"],
50-
"console_scripts": ["pytest-bdd = pytest_bdd.scripts:main"],
51-
},
52-
tests_require=["tox"],
53-
packages=["pytest_bdd"],
54-
include_package_data=True,
55-
)
3+
setup()

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
distshare = {homedir}/.tox/distshare
33
envlist = py38-pytestlatest-linters,
44
py39-pytest{43,44,45,46,50,51,52,53,54,60,61,62, latest}-coverage,
5-
py{36,37,38}-pytestlatest-coverage,
5+
py{36,37,38,310}-pytestlatest-coverage,
66
py39-pytestlatest-xdist-coverage
77
skip_missing_interpreters = true
88

@@ -34,3 +34,11 @@ commands = {env:_PYTEST_CMD:pytest} {env:_PYTEST_MORE_ARGS:} {posargs:-vvl}
3434
[testenv:py38-pytestlatest-linters]
3535
deps = black
3636
commands = black --check --verbose setup.py docs pytest_bdd tests
37+
38+
[gh-actions]
39+
python =
40+
3.6: py36
41+
3.7: py37
42+
3.8: py38
43+
3.9: py39
44+
3.10: py310

0 commit comments

Comments
 (0)