forked from 3liz/lizmap-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (38 loc) · 1.15 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
# default is no locales
# Empty in Transifex for now 20/09/2019 : bg_BG zh_CN lt_LT tr
# TODO CHECK TRANSLATIONS
# IT IS NOT USED ANYMORE
LOCALES = "cs de el en es eu fi fr gl hu_HU id it nl no pl_PL pt pt_BR ro ru sl sv_SE tr"
start_tests:
@echo 'Start docker-compose'
@cd .docker && ./start.sh
run_tests:
@echo 'Running tests, containers must be running'
@cd .docker && ./exec.sh
@flake8
stop_tests:
@echo 'Stopping/killing containers'
@cd .docker && ./stop.sh
tests: start_tests run_tests stop_tests
SHELL:=bash
COMMITID=$(shell git rev-parse --short HEAD)
REGISTRY_URL ?= 3liz
ifdef REGISTRY_URL
REGISTRY_PREFIX=$(REGISTRY_URL)/
endif
FLAVOR:=3.10
BECOME_USER:=$(shell id -u)
QGIS_IMAGE=$(REGISTRY_PREFIX)qgis-platform:$(FLAVOR)
LOCAL_HOME ?= $(shell pwd)
SRCDIR=$(shell realpath .)
test_server:
@mkdir -p $$(pwd)/.local $(LOCAL_HOME)/.cache
@docker run --rm --name qgis-server-lizmap-test-$(FLAVOR)-$(COMMITID) -w /src/test/server \
-u $(BECOME_USER) \
-v $(SRCDIR):/src \
-v $$(pwd)/.local:/.local \
-v $(LOCAL_HOME)/.cache:/.cache \
-e PIP_CACHE_DIR=/.cache \
-e PYTEST_ADDOPTS="$(TEST_OPTS)" \
$(QGIS_IMAGE) ./run-tests.sh
@flake8