spiff-element-units/Makefile

35 lines
839 B
Makefile
Raw Normal View History

2023-04-12 17:15:05 +00:00
SRC := spiff_element_units
TESTS := tests
2023-04-12 18:25:12 +00:00
TEST_DATA_DIR := $(TESTS)/data
PROCESS_MODELS_CLONE_DIR := ../../jbirddog/process-models
PROCESS_MODELS_DIR := $(TEST_DATA_DIR)/process-models
SPECS_JSON_DIR := $(TEST_DATA_DIR)/specs-json
2023-04-12 16:30:45 +00:00
DEV_SERVICE := dev
2023-04-12 17:15:05 +00:00
MY_USER := $(shell id -u)
MY_GROUP := $(shell id -g)
ME := $(MY_USER):$(MY_GROUP)
2023-04-12 18:25:12 +00:00
AS_ME := docker compose run -u $(ME)
DEV_AS_ME := $(AS_ME) $(DEV_SERVICE)
2023-04-12 17:15:05 +00:00
2023-04-12 16:30:45 +00:00
.PHONY: all
all: dev-env
dev-env:
docker compose build --progress=plain $(DEV_SERVICE)
2023-04-12 17:15:05 +00:00
.PHONY: tests
tests:
2023-04-12 18:25:12 +00:00
$(DEV_AS_ME) unittest-parallel -vs $(TESTS) -p test_*.py -t .
.PHONY: copy-process-models
copy-process-models:
rm -rf $(PROCESS_MODELS_DIR)
mkdir -p $(PROCESS_MODELS_DIR)
cd $(PROCESS_MODELS_CLONE_DIR) && \
find . -name "*.bpmn" -exec rsync -R {} ../../sartography/spiff-element-units/$(PROCESS_MODELS_DIR) \;