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
20 changes: 19 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,22 @@ jobs:
continue-on-error: true

- name: Run tests
run: pytest -v
run: pytest -v

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Mypy runs on a current supported interpreter while checking code that
# remains compatible with BOOTH's minimum Python version, 3.9.
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install boothpy (editable, with dev deps)
run: pip install -e ".[dev]"

- name: Run mypy
run: mypy src/booth/
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
dependencies = []

[project.optional-dependencies]
dev = ["pytest>=7.0"]
dev = ["pytest>=7.0", "mypy>=1.19,<2.0"]

[project.urls]
Homepage = "https://github.com/Vedantgitbot/booth"
Expand All @@ -45,4 +45,9 @@ where = ["src"]
booth = ["py.typed"]

[tool.pytest.ini_options]
testpaths = ["tests"]
testpaths = ["tests"]

[tool.mypy]
# Run mypy on Python 3.12 in CI while checking compatibility with BOOTH's
# minimum supported Python version.
python_version = "3.9"
Loading