Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.5.0 #54

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: deploy

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:

package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build and Check Package
uses: hynek/[email protected]

deploy:
runs-on: ubuntu-latest

needs: package

steps:
- name: Download Package
uses: actions/download-artifact@v3
with:
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:
files: dist/*
71 changes: 0 additions & 71 deletions .github/workflows/main.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: test

on:
push:
branches:
- "master"
- "test-me-*"

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.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, 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 run -e py --installpkg `find dist/*.tar.gz`
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: flake8
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
UNRELEASED
==========
1.5.1 (2024-01-11)
==================

* Dropped support for Python 3.6 and 3.7 (EOL).
* Added official support for Python 3.10, 3.11 and 3.12.
* Test execution order using ``--replay`` now follows the recorded order, not the collection order, as was always intended (`#52`_).

.. _`#52`: https://github.com/ESSS/pytest-replay/pull/53
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pytest-replay
.. image:: https://anaconda.org/conda-forge/pytest-replay/badges/version.svg
:target: https://anaconda.org/conda-forge/pytest-replay

.. image:: https://github.com/ESSS/pytest-replay/workflows/build/badge.svg
:target: https://github.com/ESSS/pytest-replay/actions?query=workflow%3Abuild
.. image:: https://github.com/ESSS/pytest-replay/workflows/test/badge.svg
:target: https://github.com/ESSS/pytest-replay/actions?query=workflow%3Atest

.. image:: https://img.shields.io/pypi/pyversions/pytest-replay.svg
:target: https://pypi.python.org/pypi/pytest-replay
Expand Down
20 changes: 9 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,34 @@ 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"),
long_description_content_type="text/x-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",
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_replay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def pytest_collection_modifyitems(self, items, config):
if not replay_file:
return

with open(replay_file, "r", encoding="UTF-8") as f:
with open(replay_file, encoding="UTF-8") as f:
all_lines = f.readlines()
# Use a dict to deduplicate the node ids while keeping the order.
nodeids = dict.fromkeys(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_alternate_serial_parallel_does_not_erase_runs(suite, testdir, reverse):
for command_line in command_lines:
result = testdir.runpytest_subprocess(*command_line)
assert result.ret == 0
assert set(x.basename for x in (testdir.tmpdir / "replay").listdir()) == {
assert {x.basename for x in (testdir.tmpdir / "replay").listdir()} == {
".pytest-replay.txt",
".pytest-replay-gw0.txt",
".pytest-replay-gw1.txt",
Expand All @@ -186,7 +186,7 @@ def test_skip_cleanup_does_not_erase_replay_files(suite, testdir):
for command_line in command_lines:
result = testdir.runpytest_subprocess(*command_line)
assert result.ret == 0
assert set(x.basename for x in dir.listdir()) == {
assert {x.basename for x in dir.listdir()} == {
".pytest-replay-gw0.txt",
".pytest-replay-gw1.txt",
}
Expand Down
13 changes: 2 additions & 11 deletions tox.ini
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
Comment on lines -9 to -16
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to know, is this not necessary anymore? Linting is being called in another way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to drop it and let "black" take care of that for us, and in case some comment goes over that border a bit I do not find a big deal either.


[pytest]
addopts = -ra
addopts = -ra --color=yes
Loading