-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
72 lines (53 loc) · 1.68 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
72
prod:
python manage.py migrate
python manage.py collectstatic --noinput
docker-build:
docker-compose build
docker-pull:
docker pull ayrton/kamu
docker-migrate:
docker-compose run --rm web python manage.py migrate
docker-createsuperuser:
docker-compose run --rm web python manage.py createsuperuser
docker-loaddata:
docker-compose run --rm web python manage.py loaddata dump_data/*.json
docker-dev:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up dev worker
docker-stop:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml stop
docker-test:
docker-compose run --rm -e DJANGO_SETTINGS_MODULE=core.settings.test web coverage run manage.py test
docker-heroku:
docker-compose up web
docker-down:
docker-compose down
download-cc-test-reporter:
mkdir -p tmp/
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 \
> ./tmp/cc-test-reporter
chmod +x ./tmp/cc-test-reporter
security-checks:
sh ci/security-checks.sh
backend-deps:
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
backend-tests:
. venv/bin/activate
DJANGO_SETTINGS_MODULE=core.settings.test coverage run manage.py test
coverage xml
./tmp/cc-test-reporter format-coverage -t coverage.py \
-o tmp/codeclimate.backend.json coverage.xml
frontend-deps:
npm i
frontend-lint:
npm run lint
frontend-tests:
npm test
./tmp/cc-test-reporter format-coverage -t lcov \
-o tmp/codeclimate.frontend.json coverage/lcov.info
upload-coverage:
./tmp/cc-test-reporter sum-coverage tmp/codeclimate.*.json -p 2 \
-o tmp/codeclimate.total.json
./tmp/cc-test-reporter upload-coverage -i tmp/codeclimate.total.json
test: backend-tests frontend-tests