-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Python 3.6 and 3.7, add CI for 3.10+
Also revamped our CI to build the package once and test many times, and publish GitHub release on deploy.
- Loading branch information
1 parent
666aba3
commit afeda29
Showing
6 changed files
with
56 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,28 +7,32 @@ on: | |
|
||
jobs: | ||
|
||
deploy: | ||
package: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and Check Package | ||
uses: hynek/[email protected] | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Download Package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
python-version: "3.x" | ||
- name: Install build | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: | | ||
python -m build | ||
name: Packages | ||
path: dist | ||
|
||
|
||
- name: Publish package to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} | ||
|
||
- name: Publish GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,43 +2,53 @@ name: test | |
|
||
on: [push, pull_request] | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
|
||
package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and Check Package | ||
uses: hynek/[email protected] | ||
|
||
test: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
needs: package | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.7", "3.8", "3.9"] | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
os: [ubuntu-latest, windows-latest] | ||
include: | ||
- python: "3.6" | ||
os: ubuntu-20.04 | ||
tox_env: "py36" | ||
- python: "3.6" | ||
os: windows-latest | ||
tox_env: "py36" | ||
- python: "3.7" | ||
tox_env: "py37" | ||
- python: "3.8" | ||
tox_env: "py38" | ||
- python: "3.9" | ||
tox_env: "py39" | ||
exclude: | ||
- python: "3.6" | ||
os: "windows-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download Package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install tox | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Test | ||
shell: bash | ||
run: | | ||
tox -e ${{ matrix.tox_env }} | ||
tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,36 +13,33 @@ def read(fname): | |
|
||
setup( | ||
name="pytest-replay", | ||
version="0.0.0", | ||
author="Bruno Oliveira", | ||
author="ESSS", | ||
author_email="[email protected]", | ||
maintainer="Bruno Oliveira", | ||
maintainer_email="[email protected]", | ||
license="MIT", | ||
url="https://github.com/ESSS/pytest-replay", | ||
description="Saves previous test runs and allow re-execute previous pytest runs " | ||
"to reproduce crashes or flaky tests", | ||
long_description=read("README.rst"), | ||
packages=find_packages(where="src"), | ||
package_dir={"": "src"}, | ||
install_requires=["pytest>=3.0.0"], | ||
install_requires=["pytest"], | ||
use_scm_version=True, | ||
setup_requires=[ | ||
"setuptools_scm; python_version>'3.6'", | ||
"setuptools_scm <7.0; python_version=='3.6'", | ||
"setuptools_scm", | ||
], | ||
python_requires=">=3.6", | ||
python_requires=">=3.8", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Development Status :: 5 - Production/Stable", | ||
"Framework :: Pytest", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Testing", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Operating System :: OS Independent", | ||
"License :: OSI Approved :: MIT License", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
[tox] | ||
envlist = py36,py37,py38,py39,linting | ||
envlist = py38,py39,py310,py311,py312 | ||
|
||
[testenv] | ||
deps = | ||
pytest-xdist | ||
commands = pytest {posargs:tests} | ||
|
||
[testenv:linting] | ||
skip_install = True | ||
basepython = python3.7 | ||
deps = pre-commit>=1.11.0 | ||
commands = pre-commit run --all-files --show-diff-on-failure | ||
|
||
[flake8] | ||
max-line-length = 100 | ||
|
||
[pytest] | ||
addopts = -ra | ||
addopts = -ra --color=yes |