Skip to content

chore: Add Ansible, molecule and pytest-bdd #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,16 @@ $ docker-compose down

### Automated Tests

- We use [pytest](https://docs.pytest.org/en/latest/contents.html) with the [pytest-django](https://pytest-django.readthedocs.io/en/latest/) plugin for running tests.
![Test](https://github.com/codebuddies/django-concept/workflows/Test/badge.svg)
[![codecov](https://codecov.io/gh/codebuddies/backend/branch/master/graph/badge.svg)](https://codecov.io/gh/codebuddies/backend)
See those numbers there? We want to ensure the tests are always passing, and that we have 100% code coverage.

- We use [pytest](https://docs.pytest.org/en/latest/contents.html) with the [pytest-django] plugin for running tests.
- Please add tests for your code when contributing.
- Run the test suite using `docker-compose run --rm app pytest`
- With test coverage report `docker-compose run --rm app pytest --cov-report=term --cov=.`
- Tests have been extended with [pytest-bdd] and [pytest-sugar]
- Ansible is tested with [molecule]

### Debugging with Docker Logs

Expand Down Expand Up @@ -300,4 +306,10 @@ Please see [How to contribute here]
[CodeBuddies V3 Back-end]: https://github.com/codebuddies/backend
[Codebuddies V3 Front-end]: https://github.com/codebuddies/frontend

[pytest]: https://github.com/pytest-dev/pytest
[pytest-bdd]: https://github.com/pytest-dev/pytest-bdd
[pytest-cov]: https://github.com/pytest-dev/pytest-cov
[pytest-django]: https://pytest-django.readthedocs.io/en/latest/
[pytest-sugar]: https://github.com/Frozenball/pytest-sugar
[molecule]: https://github.com/ansible-community/molecule
[to support the black lives matters movement]: https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/
3 changes: 3 additions & 0 deletions project/requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug
ipdb==0.12.2 # https://github.com/gotcha/ipdb
Sphinx==2.2.0 # https://github.com/sphinx-doc/sphinx
psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2
ansible==2.9.12 # https://github.com/ansible/ansible

# Testing
# ------------------------------------------------------------------------------
mypy==0.720 # https://github.com/python/mypy
pytest==5.1.1 # https://github.com/pytest-dev/pytest
pytest-cov==2.8.1 # https://github.com/pytest-dev/pytest-cov
pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar
pytest-bdd==3.4.0 # https://github.com/pytest-dev/pytest-bdd
molecule==3.0.8 # https://github.com/ansible-community/molecule

# Code quality
# ------------------------------------------------------------------------------
Expand Down