Skip to content

Commit 5aa22f6

Browse files
authored
Merge pull request #5 from pytest-dev/fix/support
Bump minimal requirements
2 parents 13f08f7 + 3c0420d commit 5aa22f6

File tree

4 files changed

+97
-35
lines changed

4 files changed

+97
-35
lines changed

.github/workflows/main.yml

Lines changed: 89 additions & 22 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,50 +15,50 @@ 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",
2825
"linting",
2926
"packaging",
27+
"py36",
28+
"py37",
29+
"py38",
30+
"devel",
3031
]
3132
os: [
3233
"ubuntu-latest",
3334
]
3435

3536
include:
3637

37-
- name: "ubuntu-py27"
38-
python: "2.7"
38+
- name: "linting"
39+
python: "3.6"
40+
os: ubuntu-latest
41+
tox_env: "linting"
42+
- name: "packaging"
43+
python: "3.6"
3944
os: ubuntu-latest
40-
tox_env: "py27"
41-
- name: "ubuntu-py36"
45+
tox_env: "packaging"
46+
- name: py36
4247
python: "3.6"
4348
os: ubuntu-latest
44-
tox_env: "py36"
45-
- name: "ubuntu-py37"
49+
tox_env: py36
50+
- name: py37
4651
python: "3.7"
4752
os: ubuntu-latest
48-
tox_env: "py37"
49-
- name: "ubuntu-py38"
53+
tox_env: py37
54+
- name: py38
5055
python: "3.8"
5156
os: ubuntu-latest
52-
tox_env: "py38"
53-
54-
- name: "linting"
55-
python: "3.7"
56-
os: ubuntu-latest
57-
tox_env: "linting"
58-
- name: "packaging"
59-
python: "3.7"
57+
tox_env: py38
58+
- name: devel
59+
python: "3.8"
6060
os: ubuntu-latest
61-
tox_env: "packaging"
61+
tox_env: devel
6262

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