-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 1.54 KB
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: helpt init start testapp lint test test-coverage test-ci clean-pyc publish update-test-fixture
.DEFAULT_GOAL := help
help: ## See what commands are available.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36mmake %-15s\033[0m # %s\n", $$1, $$2}'
init: clean-pyc ## Install dependencies and initialise for development.
pip install -e .[testing,docs] -U
python ./tests/testapp/manage.py migrate
python ./tests/testapp/manage.py loaddata test_data
start: ## Starts the development server.
python ./tests/testapp/manage.py runserver
lint: ## Lint the project.
pre-commit run --all-files
test: ## Test the project.
python ./runtests.py
test-future: ## Test against trunk versions of dependencies to check for future compatibility.
tox -e future
test-coverage: ## Run the tests while generating test coverage data.
coverage run ./runtests.py && coverage report && coverage html
test-ci: ## Continuous integration test suite.
tox
update-test-fixture: ## Update test fixture from the db.
python ./tests/testapp/manage.py dumpdata --natural-foreign --indent 2 -e auth.permission -e contenttypes -e wagtailcore.GroupCollectionPermission -e wagtailimages.rendition -e sessions -e wagtailcore.referenceindex -e wagtailcore.pagesubscription -e wagtailcore.workflowcontenttype -e wagtailadmin.editingsession > tests/testapp/home/fixtures/test_data.json
clean-pyc: ## Remove Python file artifacts.
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +