Skip to content

Commit

Permalink
setup twine checks
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnzZ committed Jul 4, 2024
1 parent 1c13872 commit dba9941
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,25 @@ jobs:
- name: tox
run: |
tox -e ${{ matrix.toxenv || 'py' }}
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
tox-job: ["twine-check"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: tox
run: |
tox -e ${{ matrix.tox-job }}
3 changes: 3 additions & 0 deletions duplicate_url_discarder_rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

_current_path = Path(__file__).parent.resolve()
RULE_PATHS = glob(str(_current_path / "**/*.json"), recursive=True)


__version__ = "0.1.0"
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "duplicate-url-discarder-rules"
description = "The rules for duplicate-url-discarder."
authors = [{name = "Zyte Group Ltd", email = "info@zyte.com"}]
readme = "README.rst"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"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",
]
requires-python = ">=3.8"
dynamic = ["version"]

[tool.setuptools.dynamic]
version = {attr = "duplicate_url_discarder_rules.__version__"}

[project.urls]
Source = "https://github.com/zytedata/duplicate-url-discarder-rules"
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38,py39,py310,py311,py312
envlist = py38,py39,py310,py311,py312,twine-check

[testenv]
deps =
Expand All @@ -9,3 +9,11 @@ deps =
commands =
py.test \
{posargs:duplicate_url_discarder_rules tests}

[testenv:twine-check]
deps =
build
twine
commands =
python -m build --sdist --wheel
twine check dist/*

0 comments on commit dba9941

Please sign in to comment.