-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 1.4 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
SHELL := /bin/bash
.PHONY: help
.DEFAULT_GOAL := help
ENV_FILE := .env
ifeq ($(filter $(MAKECMDGOALS),config clean),)
ifneq ($(strip $(wildcard $(ENV_FILE))),)
ifneq ($(MAKECMDGOALS),config)
include $(ENV_FILE)
export
endif
endif
endif
help: ## 💬 This help message :)
@grep -E '[a-zA-Z_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-23s\033[0m %s\n", $$1, $$2}'
ci: lint unittest functionaltest build-frontend ## 🚀 Continuous Integration (called by Github Actions)
lint: ## 🧹 Lint the code
@echo -e "\e[34m$@\e[0m" || true
@poetry run flake8 code
unittest: ## 🧪 Run the unit tests
@echo -e "\e[34m$@\e[0m" || true
@poetry run pytest -m "not azure and not functional"
functionaltest: ## 🧪 Run the functional tests
@echo -e "\e[34m$@\e[0m" || true
@ poetry run pytest -m "functional"
build-frontend: ## 🏗️ Build the Frontend webapp
@echo -e "\e[34m$@\e[0m" || true
@cd code/frontend && npm install && npm run build
azd-login: ## 🔑 Login to Azure with azd and a SPN
@echo -e "\e[34m$@\e[0m" || true
@azd auth login --client-id ${AZURE_CLIENT_ID} --client-secret ${AZURE_CLIENT_SECRET} --tenant-id ${AZURE_TENANT_ID}
deploy: azd-login ## 🚀 Deploy everything to Azure
@echo -e "\e[34m$@\e[0m" || true
@azd provision --no-prompt
@azd deploy web --no-prompt
@azd deploy function --no-prompt
@azd deploy adminweb --no-prompt