Skip to content
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
37 changes: 12 additions & 25 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2

- name: Configure Poetry
run: poetry config virtualenvs.in-project true
shell: bash

- name: Cache dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: .venv
key: v1-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
path: ~/.cache/pip
key: v1-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
v1-${{ runner.os }}-python-${{ matrix.python-version }}-

- name: Install dependencies
run: poetry install --no-interaction --no-root
run: pip install -e ".[dev]"
shell: bash

- name: Run tests
run: poetry run pytest
run: pytest
shell: bash

- name: Upload coverage to Codecov
Expand All @@ -85,27 +78,20 @@ jobs:
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2

- name: Configure Poetry
run: poetry config virtualenvs.in-project true
shell: bash

- name: Cache dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: .venv
key: v1-${{ runner.os }}-python-3.12-${{ hashFiles('**/poetry.lock') }}
path: ~/.cache/pip
key: v1-${{ runner.os }}-python-3.12-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
v1-${{ runner.os }}-python-3.12-

- name: Install dependencies
run: poetry install --no-interaction --no-root
run: pip install -e ".[dev]"
shell: bash

- name: Build documentation
run: poetry run mkdocs build --strict
run: mkdocs build --strict
shell: bash

release:
Expand All @@ -121,10 +107,11 @@ jobs:
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2
- name: Install dependencies
run: pip install build

- name: Build package
run: poetry build
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
Expand Down
29 changes: 16 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,30 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.10"
dependencies = []

[project.urls]
Homepage = "https://github.com/[USERNAME]/[REPO_NAME]"
Repository = "https://github.com/[USERNAME]/[REPO_NAME]"
Documentation = "https://github.com/[USERNAME]/[REPO_NAME]"

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.dev.dependencies]
pytest = "^8.4.2"
ruff = "^0.14.2"
mypy = "^1.18.2"
pre-commit = "^4.3.0"
pytest-cov = "^5.0.0"
mkdocs = "^1.6.1"
mkdocs-material = "^9.6.22"
[project.optional-dependencies]
dev = [
"pytest>=8.4.2",
"ruff>=0.14.2",
"mypy>=1.18.2",
"pre-commit>=4.3.0",
"pytest-cov>=5.0.0",
"mkdocs>=1.6.1",
"mkdocs-material>=9.6.22",
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]

[tool.pytest.ini_options]
addopts = "--cov=src --cov-report=xml"
Expand Down