-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix: Make django-app unit tests work; test this in cookiecutter CI #216
Conversation
784b493
to
68444ec
Compare
- Add placeholder test to allow pytest to run without complaining about not finding any tests (exit code 5). - Trim tox default envs to just pytest ones; add `doc` env explicitly to `test-all` Makefile target to compensate. This just fixes cookiecutter-django-app for now; other cookiecutters can be fixed once this is shown to work.
def test_tests(options_baked): | ||
"""Make sure the tox default tests work""" | ||
try: | ||
run_in_virtualenv('pip install -r requirements/ci.txt; tox') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tries to match the GitHub check as closely as possible -- which is part of why I rearranged the tox default envlist so we can just run tox
to get the pytest runs. (Our repos seem split on which approach they take for envlist
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a small ADR on approaches and why we are taking one over the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: Where do the GitHub checks come from? Are they in the cookiecutter, or does someone need to know what to set up? Are these documented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it's worth doing. Maybe if we decide to apply this to all the templates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checks come in via the templates -- either the base one or additional ones in the layered templates. Example: https://github.com/openedx/edx-cookiecutters/blob/master/python-template/%7B%7Bcookiecutter.placeholder_repo_name%7D%7D/.github/workflows/ci.yml#L37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks for the link.
- openedx/edx-cookiecutters#199 -- requirements - openedx/edx-cookiecutters#216 -- tox
Implement `send_to_event_bus`, accepting signal, data, topic, and key information. - Addresses #5 - Core talk-to-Kafka parts were copied from license manager prototype work, including https://github.com/openedx/license-manager/blob/38b38b0979bb5f643595337a9c189f619a7d483b/license_manager/apps/subscriptions/event_bus_utils.py#L56 - Manually tested against devstack Kafka (instructions included in commit) - Punting on caching the producer for now, but do at least cache the serializer Also: - Remove deprecated config line - Include some recent improvements from cookiecutter: - openedx/edx-cookiecutters#199 (requirements) - openedx/edx-cookiecutters#216 (test-all) Small improvements that should be upstreamed to the cookiecutter: - Clean up after docs build and before test-all - Ignore pii_report output dir
not finding any tests (exit code 5).
doc
env explicitly totest-all
Makefile target to compensate.This just fixes cookiecutter-django-app for now; other cookiecutters can
be fixed once this is shown to work.
Merge checklist: