Skip to content
Snippets Groups Projects
Commit 52288920 authored by Thilo Wischmeyer's avatar Thilo Wischmeyer
Browse files

Made makefile more readable and autodetect if frontend needs to be rebuilt

parent d81f7c51
No related branches found
No related tags found
1 merge request!255Refactor makefile
Pipeline #159326 passed
APP_LIST ?= core grady util APP_LIST ?= core grady util
DB_NAME = postgres DB_NAME = postgres
.PHONY: run install migrations-check isort isort-check test .ONESHELL:
.PHONY: run install migrations-check isort isort-check test teste2e
run: run:
python manage.py runserver 0.0.0.0:8000 python manage.py runserver 0.0.0.0:8000
...@@ -21,14 +23,19 @@ migrate: ...@@ -21,14 +23,19 @@ migrate:
test: test:
pytest --ds=grady.settings core/tests pytest --ds=grady.settings core/tests
teste2e: frontend/dist: $(shell find frontend/src -type f)
cd frontend && yarn build && cp dist/index.html ../core/templates && cd .. && python util/format_index.py && python manage.py collectstatic --no-input && HEADLESS_TESTS=$(headless) pytest --ds=grady.settings $(path); git checkout core/templates/index.html yarn --cwd frontend build
teste2e-nc:
cp frontend/dist/index.html ./core/templates && python util/format_index.py && python manage.py collectstatic --no-input && HEADLESS_TESTS=$(headless) pytest --ds=grady.settings $(path); git checkout core/templates/index.html
teste2e: frontend/dist
set -e
cp frontend/dist/index.html core/templates
trap "git checkout core/templates/index.html" EXIT
python util/format_index.py
python manage.py collectstatic --no-input
HEADLESS_TESTS=$(headless) pytest --ds=grady.settings $(path)
coverage: coverage:
set -e
DJANGO_SETTINGS_MODULE=grady.settings pytest --cov DJANGO_SETTINGS_MODULE=grady.settings pytest --cov
coverage html coverage html
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment