aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Pipfile13
-rw-r--r--README.md16
2 files changed, 28 insertions, 1 deletions
diff --git a/Pipfile b/Pipfile
index 5d48b1b..db53ce7 100644
--- a/Pipfile
+++ b/Pipfile
@@ -30,6 +30,12 @@ python_version = "3.7"
lint = "flake8"
precommit = "pre-commit install"
test = "scripts/dev.sh -c 'pipenv run coverage run -m unittest'"
+testb = """
+ scripts/dev.sh \
+ --build \
+ --clean \
+ -c 'pipenv run coverage run -m unittest'
+"""
report = "coverage report"
snekbox = """
gunicorn \
@@ -59,3 +65,10 @@ buildvenv = """
-f docker/venv.Dockerfile \
.
"""
+builddev = """
+ docker build \
+ -t pythondiscord/snekbox-venv:dev \
+ -f docker/venv.Dockerfile \
+ --build-arg DEV=1 \
+ .
+"""
diff --git a/README.md b/README.md
index 0286a2e..8e4a78a 100644
--- a/README.md
+++ b/README.md
@@ -82,12 +82,26 @@ docker-compose up
### Running Tests
-Tests are ran through coverage.py using unittest:
+Tests are ran through coverage.py using unittest. Before tests can run, the dev venv Docker image has to be built:
+
+```
+pipenv run builddev
+```
+
+Alternatively, the following command will build the image and then run the tests:
+
+```
+pipenv run testb
+```
+
+If the image doesn't need to be built, the tests can be ran with:
```
pipenv run test
```
+### Coverage
+
To see a coverage report, run
```