Skip to content

Commit 94f2f04

Browse files
committed
Run tests in CircleCI, add pytest to dev dependencies, and update contributing guide
1 parent d73a9b1 commit 94f2f04

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,14 @@ jobs:
3535
sudo apt-get update && sudo apt-get install pandoc
3636
python -m venv venv
3737
. venv/bin/activate
38-
python -m pip install ".[sphinx]"
38+
python -m pip install ".[dev,sphinx]"
3939
cd docs; make html
40+
- run:
41+
name: Run tests
42+
# TODO: This coverage report could be submitted to codecov
43+
command: |
44+
. venv/bin/activate
45+
python -m pytest --cov=src --cov-report=term --cov-report=xml
4046
- store_artifacts:
4147
path: docs/_build/html/
4248

docs/dev/index.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pull request guidelines
2525

2626
::
2727

28-
python -m pip install -e ".[sphinx]"
28+
python -m pip install -e ".[dev,sphinx]"
2929

3030
To build the documentation locally, use
3131

@@ -52,7 +52,13 @@ Pull request guidelines
5252
- Re-add any changed files to your staging area and run pre-commit again to
5353
make sure any fixes are applied to your code.
5454

55-
4. **Commit your changes and send your pull request as usual.**
55+
4. **Test Coverage**
56+
57+
For any new or changed behavior, please add unit test coverage. See notes in
58+
`conftest.py <https://github.com/melissawm/sphinx-tags/tree/main/test/conftest.py>`__
59+
for details on testing setup.
60+
61+
5. **Commit your changes and send your pull request as usual.**
5662

5763
Releases
5864
--------

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ keywords = [
1717

1818
dependencies = [
1919
"sphinx>4",
20-
"pre-commit",
2120
]
2221

2322
[project.optional-dependencies]
@@ -27,6 +26,11 @@ sphinx = [
2726
"nbsphinx",
2827
"myst-parser"
2928
]
29+
dev = [
30+
"pytest>=6.0",
31+
"pytest-cov",
32+
"pre-commit"
33+
]
3034

3135
[project.urls]
3236
Home = "https://github.com/melissawm/sphinx-tags"

0 commit comments

Comments
 (0)