Skip to content

Commit

Permalink
🔧 chore: Add Tox configuration and update CI workflow for multi-envir…
Browse files Browse the repository at this point in the history
…onment testing

- Added  to configure automated testing across multiple Python and Django versions.
- Updated GitHub Actions workflow to incorporate Tox for testing.
- Ensured CI runs Tox tests before building and publishing the package to PyPI.
- Included  for seamless integration of Tox with GitHub Actions.
- Set conditional steps to build and publish the package only if all tests pass.
  • Loading branch information
ARYAN-NIKNEZHAD committed Aug 16, 2024
1 parent 0c92d76 commit 8fe1ad0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
coverage run -m pytest
- name: Generate coverage report
run: coverage xml
- name: Run Tox tests
run: tox
- name: Upload coverage to Codecov
run: codecov
env:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ authors = ["Sepehr Akbarzadeh <[email protected]>"]
license = "GNU"
keywords = ["django", "iranian", "cities"]
repository = "https://github.com/sageteamorg/django-iranian-cities"

packages = [
{include = "iranian_cities"}
]
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
django = ">=3.2,<6.0"
Expand Down
29 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[tox]
envlist =
py38-django32, py39-django32, py310-django32, py311-django32, py312-django32,
py38-django40, py39-django40, py310-django40, py311-django40, py312-django40,
py310-django50, py311-django50, py312-django50

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
usedevelop = True
deps =
django32: django>=3.2,<3.3
django40: django>=4.0,<4.3
django50: django>=5.0,<5.3
pytest
pytest-django
pytest-cov
django-stubs
commands =
pytest --cov

setenv =
DJANGO_SETTINGS_MODULE = kernel.settings

0 comments on commit 8fe1ad0

Please sign in to comment.