Skip to content

Commit

Permalink
Merge pull request #3848 from GeotrekCE/update_makefile_conf
Browse files Browse the repository at this point in the history
update makefile with coverage cmd (vscode)
  • Loading branch information
juggler31 authored Dec 7, 2023
2 parents 46ad1bc + 6e5957d commit f29e8ad
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ else
docker_compose=docker-compose
endif

###########################
# colors #
###########################
PRINT_COLOR = printf
COLOR_SUCCESS = \033[1;32m
COLOR_DEBUG = \033[36m
COLOR_RESET = \033[0m

build:
docker build -t geotrek . --build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG)

Expand All @@ -30,6 +38,17 @@ flake8:
messages:
$(docker_compose) run --rm web ./manage.py makemessages -a --no-location

###########################
# coverage #
###########################
verbose_level ?= 1
.PHONY: coverage
coverage:
@$(PRINT_COLOR) "$(COLOR_SUCCESS) ### Start coverage ### $(COLOR_RESET)\n"
$(docker_compose) run -e ENV=tests web coverage run ./manage.py test $(test_name) -v $(verbose_level)
$(docker_compose) run -e ENV=tests_nds web coverage run -a ./manage.py test $(test_name) -v $(verbose_level)
$(docker_compose) run -e ENV=tests web coverage lcov

test:
$(docker_compose) run -e ENV=tests --rm web ./manage.py test

Expand Down

0 comments on commit f29e8ad

Please sign in to comment.