Skip to content
Open
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
3 changes: 3 additions & 0 deletions .github/actions/python-poetry-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ runs:
- uses: actions/setup-python@v5
with:
python-version: ${{inputs.python-version}}
allow-prereleases: true
cache: 'pip'
cache-dependency-path: 'poetry.lock'
- name: Install poetry
run: python -m pip install poetry
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
auto-update-project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
# a PAT is required to be able to update workflows
GITHUB_TOKEN: ${{ secrets.AUTO_UPDATE_GITHUB_TOKEN }}
if: ${{ steps.changes.outputs.changed > 0 && env.GITHUB_TOKEN != 0 }}
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v8
with:
token: ${{ env.GITHUB_TOKEN }}
commit-message: >-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
auto-update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ./.github/actions/python-poetry-env

- name: Install tabulate
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ steps.check_for_outdated_dependencies.outputs.body != 0 }}
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v8
with:
token: ${{ env.GITHUB_TOKEN }}
commit-message: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
draft-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ./.github/actions/python-poetry-env
- name: Update version
id: updated_version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ./.github/actions/python-poetry-env
- name: Publish to pypi
run: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ on:
branches:
- "**"

env:
FORCE_COLOR: 1

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Download actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.21
shell: bash
Expand All @@ -22,14 +25,14 @@ jobs:
name: Check if automatic project update was successful
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Fail if .rej files exist as structure update was not successful
run: test -z "$(find . -iname '*.rej')"

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ./.github/actions/python-poetry-env
- run: poetry run pre-commit run --all-files

Expand All @@ -38,9 +41,9 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ./.github/actions/python-poetry-env
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -49,6 +52,6 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ./.github/actions/python-poetry-env
- run: poetry run mkdocs build
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Support for Python 3.15

### Fixed
- Fix malformed bullet points rendering in GitHub Pages documentation

Expand Down
10 changes: 5 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
Expand Down Expand Up @@ -60,7 +61,7 @@ slowest-tests = "pytest_split.cli:list_slowest_tests"
pytest-split = "pytest_split.plugin"

[tool.black]
target-version = ["py310", "py311", "py312", "py313", "py314"]
target-version = ["py310", "py311", "py312", "py313", "py314", "py315"]
include = '\.pyi?$'

[tool.pytest.ini_options]
Expand Down
5 changes: 3 additions & 2 deletions src/pytest_split/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def list_slowest_tests() -> None:
"default is .test_durations in the current working directory"
),
default=".test_durations",
type=argparse.FileType(),
)
parser.add_argument(
"-c",
Expand All @@ -21,7 +20,9 @@ def list_slowest_tests() -> None:
type=int,
)
args = parser.parse_args()
return _list_slowest_tests(json.load(args.durations_path), args.count)
with open(args.durations_path) as f:
durations = json.load(f)
return _list_slowest_tests(durations, args.count)


def _list_slowest_tests(durations: "dict[str, float]", count: int) -> None:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def durations_file(tmpdir):
durations = {f"test_{i}": float(i) for i in range(1, 11)}
with open(durations_path, "w") as f:
json.dump(durations, f)
with open(durations_path) as f:
yield f
return durations_path


def test_slowest_tests(durations_file):
Expand Down