This repository has been archived by the owner on May 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (45 loc) · 1.49 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: dev
start-frontend:
cd frontend && npm run start
start-backend: build dev
update-local-dev:
pip install --upgrade pip
pip install -r requirements.txt
cd frontend && npm install
make migrate
show-versions:
which python && python --version
which npm && npm --version
which node && node --version
dev:
python manage.py runserver
migrate:
python manage.py migrate
sitemap:
python create_sitemap.py
# see details of npm commands in frontend/package.json
build:
cd frontend && npm run build
clear-build:
rm -rfv frontend/build
#######################################
############# TESTS ###################
#######################################
test-unit:
cd frontend && npm run test-unit # watch mode activated
test-unit-ci:
cd frontend && npm run test-unit-ci # tests will stop after run
# End to end testing
test-e2e:
# Build front-end files
# Set CI to a blank string to disable warnings on CI.
# See https://github.com/facebook/create-react-app/issues/2453
cd frontend && CI="" npm run build
# Run Django server and detach it. Then store its process id in a temporary file.
{ nohup ./manage.py runserver & echo $$! > e2e_server_pid.txt; }
# Run end-to-end tests
cd frontend && node tests-e2e/local.runner.js -c tests-e2e/browserstack.conf.js -e chrome
# Kill Django server using its process id.
kill -9 `cat e2e_server_pid.txt` ; echo avoid finishing with an error exit code
rm e2e_server_pid.txt ; echo avoid finishing with an error exit code
test-all: test-unit-ci test-e2e