-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
71 lines (57 loc) · 2.3 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
64
65
66
67
68
69
70
71
init:
docker compose up -d \
&& pip install --upgrade pip \
&& pip install -r requirements_for_test.txt \
&& npm i \
&& make static_files_process \
&& make collect_static \
&& psql postgres://admin:secret@localhost:5432/postgres -c "create database accessibility_monitoring_app;" \
&& python prepare_local_db.py \
&& ./manage.py migrate \
&& echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('[email protected]', '[email protected]', 'secret')" | python manage.py shell \
&& echo "email: [email protected] & password: secret"
freeze_requirements: # Pin all requirements including sub dependencies into requirements.txt
pip install --upgrade pip-tools
pip-compile --upgrade requirements.in
clean_local:
docker compose down
rm -rf ./data
rm -rf ./node_modules
rm -rf ./venv
rm ./.env
start:
python manage.py runserver 8081
start_report_viewer:
python manage_report_viewer.py runserver 8082
static_files_process:
node pulp/init.js ./accessibility_monitoring_platform_settings.json --nowatch
static_files_process_watch:
node pulp/init.js ./accessibility_monitoring_platform_settings.json
collect_static:
python3 manage.py collectstatic --noinput
python3 manage_report_viewer.py collectstatic --noinput
test_accessibility_monitoring_platform:
python manage.py collectstatic --noinput \
&& coverage run -m -p pytest --ignore="stack_tests/" --ignore="report_viewer/" -c pytest.ini \
&& coverage run --source='./accessibility_monitoring_platform/' -p manage.py test accessibility_monitoring_platform/ \
&& coverage combine \
&& coverage report --skip-covered \
&& coverage erase
test_report_viewer:
python manage_report_viewer.py collectstatic --noinput \
&& coverage run -m -p pytest --ignore="stack_tests/" --ignore="accessibility_monitoring_platform/" -c pytest_report_viewer.ini \
&& coverage combine \
&& coverage report --skip-covered \
&& coverage erase
test:
make test_accessibility_monitoring_platform
make test_report_viewer
npm test
int_test:
docker compose --file stack_tests/integration_tests/docker-compose.yml up --abort-on-container-exit
deploy_prototype:
python aws_prototype/main.py -b up
breakdown_prototype:
python aws_prototype/main.py -b down
new_account_prototype:
python aws_prototype/main.py -b newaccount