Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 86bded7

Browse files
committed
Bump minimal requirements
py36 and pytest>=6.0.1 are minimal supported now. This counts as a breaking change so will require correct versioning.
1 parent 13f08f7 commit 86bded7

4 files changed

Lines changed: 87 additions & 28 deletions

File tree

.github/workflows/main.yml

Lines changed: 79 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: main
1+
name: tox
22

33
on:
44
push:
@@ -15,16 +15,17 @@ on:
1515

1616
jobs:
1717
build:
18+
name: ${{ matrix.name }}
1819
runs-on: ${{ matrix.os }}
1920

2021
strategy:
2122
fail-fast: false
2223
matrix:
2324
name: [
24-
"ubuntu-py27",
25-
"ubuntu-py36",
26-
"ubuntu-py37",
27-
"ubuntu-py38",
25+
"py36",
26+
"py37",
27+
"py38",
28+
"devel",
2829
"linting",
2930
"packaging",
3031
]
@@ -34,22 +35,18 @@ jobs:
3435

3536
include:
3637

37-
- name: "ubuntu-py27"
38-
python: "2.7"
39-
os: ubuntu-latest
40-
tox_env: "py27"
41-
- name: "ubuntu-py36"
38+
- name: py36
4239
python: "3.6"
4340
os: ubuntu-latest
44-
tox_env: "py36"
45-
- name: "ubuntu-py37"
41+
tox_env: py36
42+
- name: py37
4643
python: "3.7"
4744
os: ubuntu-latest
48-
tox_env: "py37"
49-
- name: "ubuntu-py38"
45+
tox_env: py37
46+
- name: py38
5047
python: "3.8"
5148
os: ubuntu-latest
52-
tox_env: "py38"
49+
tox_env: py38
5350

5451
- name: "linting"
5552
python: "3.7"
@@ -72,3 +69,70 @@ jobs:
7269
pip install tox
7370
- name: Test
7471
run: "tox -e ${{ matrix.tox_env }}"
72+
73+
publish:
74+
name: Publish to PyPI registry
75+
needs:
76+
- build
77+
runs-on: ubuntu-latest
78+
79+
env:
80+
PY_COLORS: 1
81+
TOXENV: packaging
82+
83+
steps:
84+
- name: Switch to using Python 3.6 by default
85+
uses: actions/setup-python@v2
86+
with:
87+
python-version: 3.6
88+
- name: Install tox
89+
run: python -m pip install --user tox
90+
- name: Check out src from Git
91+
uses: actions/checkout@v2
92+
with:
93+
# Get shallow Git history (default) for tag creation events
94+
# but have a complete clone for any other workflows.
95+
# Both options fetch tags but since we're going to remove
96+
# one from HEAD in non-create-tag workflows, we need full
97+
# history for them.
98+
fetch-depth: >-
99+
${{
100+
(
101+
github.event_name == 'create' &&
102+
github.event.ref_type == 'tag'
103+
) &&
104+
1 || 0
105+
}}
106+
- name: Drop Git tags from HEAD for non-tag-create events
107+
if: >-
108+
github.event_name != 'create' ||
109+
github.event.ref_type != 'tag'
110+
run: >-
111+
git tag --points-at HEAD
112+
|
113+
xargs git tag --delete
114+
- name: Build dists
115+
run: python -m tox
116+
- name: Publish to test.pypi.org
117+
if: >-
118+
(
119+
github.event_name == 'push' &&
120+
github.ref == format(
121+
'refs/heads/{0}', github.event.repository.default_branch
122+
)
123+
) ||
124+
(
125+
github.event_name == 'create' &&
126+
github.event.ref_type == 'tag'
127+
)
128+
uses: pypa/gh-action-pypi-publish@master
129+
with:
130+
password: ${{ secrets.testpypi_password }}
131+
repository_url: https://test.pypi.org/legacy/
132+
- name: Publish to pypi.org
133+
if: >- # "create" workflows run separately from "push" & "pull_request"
134+
github.event_name == 'create' &&
135+
github.event.ref_type == 'tag'
136+
uses: pypa/gh-action-pypi-publish@master
137+
with:
138+
password: ${{ secrets.pypi_password }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
[![PyPI version](https://img.shields.io/pypi/v/pytest-plus.svg)](https://pypi.org/project/pytest-plus)
44
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-plus.svg)](https://pypi.org/project/pytest-plus)
5-
![CI](https://github.com/pytest-dev/pytest-plus/workflows/main/badge.svg)
5+
![CI](https://github.com/pytest-dev/pytest-plus/workflows/tox/badge.svg)
66
[![Python Black Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
77

8-
This plugin aims to be used to host multiple pytest extensions that meet the
9-
following criteria:
8+
This plugin aims to be used to host multiple basic pytest extensions that meet
9+
the following criteria:
1010

11-
* Keep py27 compatibility for the moment
11+
* Keep py36 compatibility
1212
* Downgrade gracefully, meaning that if the plugin is removed, you will still
1313
be able to run pytest
1414

setup.cfg

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ classifiers =
3131
License :: OSI Approved :: MIT License
3232
Natural Language :: English
3333
Operating System :: OS Independent
34-
Programming Language :: Python :: 2
35-
Programming Language :: Python :: 2.7
3634
Programming Language :: Python :: 3
37-
Programming Language :: Python :: 3.5
3835
Programming Language :: Python :: 3.6
3936
Programming Language :: Python :: 3.7
4037
Programming Language :: Python :: 3.8
@@ -51,7 +48,7 @@ keywords =
5148

5249
[options]
5350
use_scm_version = True
54-
python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
51+
python_requires = >=3.6
5552
packages = find:
5653
include_package_data = True
5754
zip_safe = False
@@ -62,10 +59,8 @@ setup_requires =
6259
setuptools_scm_git_archive >= 1.0
6360

6461
install_requires =
65-
pytest >= 3.50
66-
# https://github.com/pytest-dev/pytest/issues/5854
67-
more_itertools >= 5, < 6; python_version<"3.0"
68-
more_itertools >= 6; python_version>="3.0"
62+
pytest >= 6.0.1
63+
more_itertools >= 8.4.0
6964

7065
[options.extras_require]
7166
test =

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ envlist =
55
linting
66
devel
77
packaging
8-
py{27,35,36,37,38}
8+
py{36,37,38}
99
skipsdist = True
1010
isolated_build = True
1111

0 commit comments

Comments
 (0)