diff --git a/Docker.md b/Docker.md index 6c073bf..8c2d083 100644 --- a/Docker.md +++ b/Docker.md @@ -56,6 +56,17 @@ Otherwise, users may also wish to run tests. Users can easily run tests by takin For an all in one testing strategy, the `test` service should be preferred, as it also runs linter checks which the aurweb project requires: flake8 and isort. This test is identical to GitLab CI's tests. +Our test suites also provide coverage data via a shared volume directory at `$aurwebdir/cache/`. After tests are complete, users can copy coverage data output by Docker into their local setup by executing `./util/fix-coverage ./cache/.coverage`. After this is done, users can continue on with standard coverage execution: + + $ docker-compose run pytest-mysql + ... + $ ./util/fix-coverage ./cache/.coverage + $ coverage report + $ coverage html + $ htmlcov/index.html + +Test services which provide coverage data: `pytest-mysql`, `pytest-sqlite`, and `test`. + ## Production For production, the `fastapi` (exposed on localhost:18000) and `php-fpm` (exposed on localhost:19000) services can be used to supply back-ends to a host instance of nginx. The `git` service (exposed on localhost:2222) should be used for a Docker-contained AUR sshd.