You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Building development images](#building-development-images)
32
33
-[Running development containers](#running-development-containers)
@@ -370,6 +371,23 @@ For more information on Python logging configuration, see the [Python `logging`
370
371
371
372
- Pre-commit is also useful as a CI tool. The [hooks](.github/workflows/hooks.yml) GitHub Actions workflow runs pre-commit hooks with [GitHub Actions](https://github.com/features/actions).
372
373
374
+
### Testing with pytest
375
+
376
+
- Tests are in the _tests/_ directory.
377
+
- Run tests by [invoking `pytest`from the command-line](https://docs.pytest.org/en/stable/usage.html) in the root directory of the repo.
378
+
- [pytest](https://docs.pytest.org/en/latest/) features used include:
- [FastAPI testing](https://fastapi.tiangolo.com/tutorial/testing/) and [Starlette testing](https://www.starlette.io/testclient/) rely on the [Starlette `TestClient`](https://www.starlette.io/testclient/), which uses [Requests](https://requests.readthedocs.io/en/master/) under the hood.
388
+
- Test coverage results are reported when invoking `pytest`from the command-line. To see interactive HTML coverage reports, invoke pytest with`pytest --cov-report=html`.
389
+
- Test coverage reports are generated within GitHub Actions workflows by [pytest-cov](https://github.com/pytest-dev/pytest-cov) with [coverage.py](https://github.com/nedbat/coveragepy), and uploaded to [Codecov](https://docs.codecov.io/docs) using [codecov/codecov-action](https://github.com/marketplace/actions/codecov). Codecov is then integrated into pull requests with the [Codecov GitHub app](https://github.com/marketplace/codecov).
390
+
373
391
### GitHub Actions workflows
374
392
375
393
[GitHub Actions](https://github.com/features/actions) is a continuous integration/continuous deployment (CI/CD) service that runs on GitHub repos. It replaces other services like Travis CI. Actions are grouped into workflows and stored in _.github/workflows_. See my [GitHub Actions Gist](https://gist.github.com/br3ndonland/f9c753eb27381f97336aa21b8d932be6) for more info on GitHub Actions.
0 commit comments