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)
This commit is contained in:
Alessio Bogon 2021-04-16 09:27:31 +02:00 committed by GitHub
parent 123cd22701
commit 26adcc468a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 72 deletions

18
.editorconfig Normal file
View File

@ -0,0 +1,18 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.py]
indent_style = space
indent_size = 4
[*.yml]
indent_style = space
indent_size = 2

30
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Main testing workflow
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", 3.10.0-alpha.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools
pip install tox tox-gh-actions codecov
- name: Test with tox
run: |
tox
codecov

View File

@ -1,18 +0,0 @@
dist: bionic
language: python
python:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
install: pip install tox tox-travis coverage codecov
script: tox --recreate
branches:
except:
- "/^\\d/"
after_success:
- codecov
notifications:
email:
- bubenkoff@gmail.com
- oleg.pidsadnyi@gmail.com

View File

@ -1,2 +1,48 @@
[metadata]
name = pytest-bdd
description = BDD for pytest
long_description = file: README.rst, AUTHORS.rst, CHANGES.rst
long_description_content_type = text/x-rst
author = Oleg Pidsadnyi, Anatoly Bubenkov and others
license = MIT license
author_email = oleg.pidsadnyi@gmail.com
url = https://github.com/pytest-dev/pytest-bdd
version = attr: pytest_bdd.__version__
classifiers =
Development Status :: 6 - Mature
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: POSIX
Operating System :: Microsoft :: Windows
Operating System :: MacOS :: MacOS X
Topic :: Software Development :: Testing
Topic :: Software Development :: Libraries
Topic :: Utilities
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
[options]
python_requires = >=3.6
install_requires =
glob2
Mako
parse
parse_type
py
pytest>=4.3
tests_require = tox
packages = pytest_bdd
include_package_data = True
[options.entry_points]
pytest11 =
pytest-bdd = pytest_bdd.plugin
console_scripts =
pytest-bdd = pytest_bdd.scripts:main
[bdist_wheel] [bdist_wheel]
universal = 1 universal = 1

View File

@ -1,55 +1,3 @@
#!/usr/bin/env python
"""pytest-bdd package config."""
import codecs
import os
import re
from setuptools import setup from setuptools import setup
dirname = os.path.dirname(__file__) setup()
long_description = (
codecs.open(os.path.join(dirname, "README.rst"), encoding="utf-8").read()
+ "\n"
+ codecs.open(os.path.join(dirname, "AUTHORS.rst"), encoding="utf-8").read()
)
with codecs.open(os.path.join(dirname, "pytest_bdd", "__init__.py"), encoding="utf-8") as fd:
VERSION = re.compile(r".*__version__ = ['\"](.*?)['\"]", re.S).match(fd.read()).group(1)
setup(
name="pytest-bdd",
description="BDD for pytest",
long_description=long_description,
long_description_content_type="text/x-rst",
author="Oleg Pidsadnyi, Anatoly Bubenkov and others",
license="MIT license",
author_email="oleg.pidsadnyi@gmail.com",
url="https://github.com/pytest-dev/pytest-bdd",
version=VERSION,
classifiers=[
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
]
+ [("Programming Language :: Python :: %s" % x) for x in "3.6 3.7 3.8 3.9".split()],
python_requires=">=3.6",
install_requires=["glob2", "Mako", "parse", "parse_type", "py", "pytest>=4.3"],
# the following makes a plugin available to pytest
entry_points={
"pytest11": ["pytest-bdd = pytest_bdd.plugin"],
"console_scripts": ["pytest-bdd = pytest_bdd.scripts:main"],
},
tests_require=["tox"],
packages=["pytest_bdd"],
include_package_data=True,
)

10
tox.ini
View File

@ -2,7 +2,7 @@
distshare = {homedir}/.tox/distshare distshare = {homedir}/.tox/distshare
envlist = py38-pytestlatest-linters, envlist = py38-pytestlatest-linters,
py39-pytest{43,44,45,46,50,51,52,53,54,60,61,62, latest}-coverage, py39-pytest{43,44,45,46,50,51,52,53,54,60,61,62, latest}-coverage,
py{36,37,38}-pytestlatest-coverage, py{36,37,38,310}-pytestlatest-coverage,
py39-pytestlatest-xdist-coverage py39-pytestlatest-xdist-coverage
skip_missing_interpreters = true skip_missing_interpreters = true
@ -34,3 +34,11 @@ commands = {env:_PYTEST_CMD:pytest} {env:_PYTEST_MORE_ARGS:} {posargs:-vvl}
[testenv:py38-pytestlatest-linters] [testenv:py38-pytestlatest-linters]
deps = black deps = black
commands = black --check --verbose setup.py docs pytest_bdd tests commands = black --check --verbose setup.py docs pytest_bdd tests
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310