forked from impak-finance/django-oidc-rp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (46 loc) · 1.6 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
.PHONY: install qa lint tests spec coverage docs build clean deploy build_and_deploy
init:
pipenv install --dev --three
# DEVELOPMENT
# ~~~~~~~~~~~
# The following rules can be used during development in order to compile staticfiles, generate
# locales, build documentation, etc.
# --------------------------------------------------------------------------------------------------
docs:
cd docs && rm -rf _build && pipenv run make html
shell:
pipenv run ipython
# QUALITY ASSURANCE
# ~~~~~~~~~~~~~~~~~
# The following rules can be used to check code quality, import sorting, etc.
# --------------------------------------------------------------------------------------------------
qa: lint isort
# Code quality checks (eg. flake8, eslint, etc).
lint:
pipenv run flake8
# Import sort checks.
isort:
pipenv run isort --check-only --recursive --diff oidc_rp tests
# TESTING
# ~~~~~~~
# The following rules can be used to trigger tests execution and produce coverage reports.
# --------------------------------------------------------------------------------------------------
# Just runs all the tests!
tests:
pipenv run py.test
# Collects code coverage data.
coverage:
pipenv run py.test --cov-report term-missing --cov oidc_rp
# Run the tests in "spec" mode.
spec:
pipenv run py.test --spec
build:
docker-compose run --entrypoint "sh /code/docker/build.sh" django-oidc-rp --rm
clean:
docker-compose run --entrypoint "sh /code/docker/clean.sh" django-oidc-rp --rm
deploy:
docker-compose run --entrypoint "sh /code/docker/upload.sh" django-oidc-rp --rm
build_and_deploy:
make clean
make build
make deploy