diff options
| author | 2021-02-07 20:25:41 +0000 | |
|---|---|---|
| committer | 2021-02-07 20:25:41 +0000 | |
| commit | c9368a4c67845132354c063483b86ad7d6959307 (patch) | |
| tree | 252eebb614063f16cb7c1fb2c070a8de635ce8d9 /Pipfile | |
| parent | Remove cgroup parent constants from config file (diff) | |
| parent | Merge PR #92 - replace shell scripts with Python scripts (diff) | |
Merge branch 'master' into dynamic-parent-cgroups
Diffstat (limited to 'Pipfile')
| -rw-r--r-- | Pipfile | 41 |
1 files changed, 17 insertions, 24 deletions
@@ -30,31 +30,24 @@ pydocstyle = "~= 5.1" python_version = "3.9" [scripts] +eval = "python -m snekbox" +webserver = "gunicorn -c config/gunicorn.conf.py snekbox.api.app" + +# Linting lint = "pre-commit run --all-files" precommit = "pre-commit install" -test = "sh scripts/dev.sh -c 'pipenv run coverage run -m unittest'" -testb = """ - sh scripts/dev.sh \ - --build \ - --clean \ - -c 'pipenv run coverage run -m unittest' -""" + +# Testing report = "coverage report" -snekbox = "gunicorn -c config/gunicorn.conf.py snekbox.api.app" -eval = "python -m snekbox" -devsh = "sh scripts/dev.sh" -protoc = "sh scripts/protoc.sh" -build = """ - docker build \ - -t ghcr.io/python-discord/snekbox:latest \ - -f Dockerfile \ - . -""" -builddev = """ - docker build \ - -t ghcr.io/python-discord/snekbox-venv:dev \ - -f Dockerfile \ - --target venv \ - --build-arg DEV=1 \ - . +# Fix ownership of the coverage file even if tests fail & preserve exit code +test = """ + docker-compose run --entrypoint /bin/bash --rm snekbox -c \ + 'coverage run -m unittest; e=$?; chown --reference=. .coverage; exit $e' """ + +# Docker +build = "docker build -t ghcr.io/python-discord/snekbox:latest ." +devsh = "docker-compose run --entrypoint /bin/bash --rm snekbox" + +# Other +protoc = "python -m scripts.protoc" |