Skip to content
Snippets Groups Projects
Makefile 6.20 KiB
_docs:
	cd docs-sources && pip install -r requirements.txt

storybook/build:
	npm run storybook:build -w packages/ui

docs/build: _docs
	cd docs-sources && mkdocs build -d ../docs
	GIT_SHA=dontcare $(MAKE) storybook/build

docs/serve: _docs
	cd docs-sources && mkdocs serve -a localhost:8080

docs/generate-schema:
	# Planter vient de https://github.com/achiku/planter
	docker run --net=camino_default --rm agileek/planter planter postgres://postgres:password@camino_api_db/camino?sslmode=disable > docs-sources/assets/database/camino-db.uml
	cat docs-sources/assets/database/camino-db.uml | docker run --rm -i agileek/plantuml:1.2022.3 > docs-sources/docs/img/camino-db.svg
	cat docs-sources/assets/keycloak_impersonate.uml | docker run --rm -i agileek/plantuml:1.2022.3 > docs-sources/docs/img/keycloak_impersonate.svg
	cat docs-sources/assets/architecture.puml | docker run --rm -i agileek/plantuml:1.2022.3 > docs-sources/docs/img/architecture.svg

daily:
ifdef CAMINO_STAGE
	npm run daily -w packages/api
else
	@echo 'lancement du daily en mode local avec la migration'
	npm run db:migrate -w packages/api
	npm run daily -w packages/api
endif

daily/debug:
	npm run daily-debug -w packages/api

monthly:
	npm run monthly -w packages/api


db/migrate:
	npm run db:migrate -w packages/api

db/check-queries:
ifndef CI
	npm run db:watch -w packages/api
else
	npm run db:check -w packages/api
endif

test: test/ui test/api test/common
test/api: test/api-unit test/api-integration
test/ui:
ifndef CI
	npm run test -w packages/ui
else
	npm run test -w packages/ui -- --coverage
endif

storybook/test:
ifndef CI
	npm run storybook:test -w packages/ui
else
	npm run storybook:test -w packages/ui -- --url http://localhost/storybook/
endif

test/common:
	npm run test -w packages/common

test/api-unit:
ifndef CI
	npm run test:unit -w packages/api
else
	npm run test:unit -w packages/api -- --coverage