Skip to content
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

feat!: removing the never-used Dockerfile-testing #2503

Merged
merged 1 commit into from
Jun 17, 2024
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
27 changes: 0 additions & 27 deletions Dockerfile-testing

This file was deleted.

13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,5 @@ pii_check: ## Check for PII annotations on all Django models
coverage:
coverage xml

### Local testing suite commands ###

build_test_image: # Builds Docker image used for testing so devs don't need to install requirements locally (useful for firefox / xvfb)
docker build -t credentials:local -f Dockerfile-testing .

# This should be ran locally, not inside of the devstack container
quality_and_translations_tests_suite: build_test_image
docker run -e "TERM=xterm-256color" -v /edx/app/credentials/node_modules/ -v `pwd`:/edx/app/credentials/ credentials:local bash -c 'cd /edx/app/credentials/ && make check_translations_up_to_date && make validate_translations && make quality && make check_keywords && make pii_check'

# This should be ran locally, not inside of the devstack container
unit_tests_suite: build_test_image
docker run -e "TERM=xterm-256color" -v /edx/app/credentials/node_modules/ -v `pwd`:/edx/app/credentials/ credentials:local bash -c 'cd /edx/app/credentials/ && make static && make tests && make coverage'

docs:
tox -e docs
16 changes: 0 additions & 16 deletions docs/testing.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
Testing
=======

In order for developers to have a consistent experience between CI and local testing, we are using a locally built
container image that mimics the ones that Github Actions uses.

NOTE: The first time you run any of the test suites below, it
will build the image which will take a few minutes. Following test runs will be quicker.

To make testing easier, there are a few commands that mirror our suites in CI:

.. code-block:: bash

$ make unit_tests_suite
$ make quality_and_translations_tests_suite

This will run the Python, the Javascript tests, and our quality and translation suite, respectively.


Writing Python Tests
--------------------
Tests should be written for all new features. The `Django docs`_ are a good resource for learning how to test Django code.
Expand Down
Loading