-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 1.07 KB
/
Makefile
File metadata and controls
37 lines (30 loc) · 1.07 KB
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
ifdef PSCOMPOSE_SETTINGS
TEST_CONFIG := $(PSCOMPOSE_SETTINGS)
else
TEST_CONFIG := ./SAMPLE_CONFIG.yml
endif
.PHONY: run-api
run-api:
uvicorn pscompose.api.api:app --reload --host 0.0.0.0 --port 8000 --root-path /api
.PHONY: docker-build
docker-build:
@echo "Building docker image..."
$(eval HASH := $(shell docker build -q .))
@echo $(HASH)
.PHONY: docker
docker: docker-build
docker run -p "8080:80" -it $(HASH)
.PHONY: css-watch
css-watch:
@echo "Starting tailwind via npm to watch for CSS changes..."
cd pscompose/frontend && npm run css-watch
.PHONY: run-frontend
run-frontend:
@echo "Starting simple HTTP server on http://localhost:5001/"
cd pscompose/frontend && npm run generate-components-index && python3 server.py --port=5001
.PHONY: test
test:
@echo "Running pytest test harness for Frontend (playwright/pytest) and Backend (standard pytest) tests..."
source venv/bin/activate && pip install -r dev_requirements.txt
source venv/bin/activate && playwright install
source venv/bin/activate && PSCOMPOSE_SETTINGS=$(TEST_CONFIG) python3 -m pytest -v -s tests/*.py