-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tox for easy testing of many Python versions (#523)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
102 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
- uses: pre-commit/action@v3.0.0 |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: 1.3.1 | ||
hooks: | ||
- id: tox-ini-fmt | ||
|
||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
|
||
ci: | ||
autoupdate_schedule: quarterly |
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,21 +1,33 @@ | ||
[build-system] | ||
requires = ["flit_core >=2,<4"] | ||
build-backend = "flit_core.buildapi" | ||
requires = [ | ||
"flit_core<4,>=2", | ||
] | ||
|
||
[tool.flit.metadata] | ||
module = "blurb" | ||
author = "Larry Hastings" | ||
author-email = "larry@hastings.org" | ||
maintainer = "Python Core Developers" | ||
maintainer-email = "core-workflow@mail.python.org" | ||
home-page = "https://github.com/python/core-workflow/tree/main/blurb" | ||
[project] | ||
name = "blurb" | ||
description = "Command-line tool to manage CPython Misc/NEWS.d entries." | ||
readme = "README.rst" | ||
maintainers = [{name = "Python Core Developers", email="core-workflow@mail.python.org"}] | ||
authors = [{ name="Larry Hastings", email="larry@hastings.org"}] | ||
requires-python = ">=3.8" | ||
description-file = "README.rst" | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3 :: Only" | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
|
||
[tool.flit.scripts] | ||
dynamic = [ | ||
"version", | ||
] | ||
[project.optional-dependencies] | ||
tests = [ | ||
"pyfakefs", | ||
"pytest", | ||
"pytest-cov", | ||
] | ||
[project.urls] | ||
Changelog = "https://github.com/python/core-workflow/tree/main/blurb#changelog" | ||
Homepage = "https://github.com/python/core-workflow/tree/main/blurb" | ||
Source = "https://github.com/python/core-workflow/tree/main/blurb" | ||
[project.scripts] | ||
blurb = "blurb:main" |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[tox] | ||
requires = | ||
tox>=4.2 | ||
env_list = | ||
py{313, 312, 311, 310, 39, 38} | ||
|
||
[testenv] | ||
extras = | ||
tests | ||
pass_env = | ||
FORCE_COLOR | ||
commands = | ||
{envpython} -I -m pytest \ | ||
--cov blurb \ | ||
--cov tests \ | ||
--cov-report html \ | ||
--cov-report term \ | ||
--cov-report xml \ | ||
{posargs} | ||
blurb test | ||
blurb help |