GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CloudShell/Makefile at main · iu2frl/CloudShell

Expand file tree

/

Makefile

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
114 lines (93 loc) · 3.69 KB
/

Makefile

Copy path

File metadata and controls

114 lines (93 loc) · 3.69 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
.PHONY: help dev build build-backend build-frontend smoke-test up down logs restart shell test test-unit test-coverage test-all full-ci
COMPOSE = docker compose
help:
@echo "CloudShell -- available targets:"
@echo ""
@echo " make dev Start backend + frontend dev servers (no Docker)"
@echo " make build Build both Docker images"
@echo " make build-backend Build the backend image only"
@echo " make build-frontend Build the frontend image only"
@echo " make up Start the stack with Docker Compose (detached)"
@echo " make down Stop the stack"
@echo " make logs Tail container logs"
@echo " make restart Restart all containers"
@echo " make shell Open a shell inside the running backend container"
@echo " make smoke-test Run the two-container Docker smoke test locally"
@echo ""
@echo " make test Run the full test suite (pytest + vitest + coverage)"
@echo " make test-unit Run tests without coverage reporting (fast)"
@echo " make test-coverage Run tests and open the HTML coverage report"
@echo " make test-all Run tests for Python 3.11, 3.12, and 3.13"
@echo " make full-ci Run full test suite then build Docker images"
@echo ""
# -- Local development (no Docker) ---------------------------------------------
dev:
@echo "Starting backend..."
DATA_DIR=/tmp/cloudshell-dev SECRET_KEY=devsecret ADMIN_USER=admin ADMIN_PASSWORD=admin \
CORS_ORIGINS="http://localhost:5173" \
.venv/bin/python -m uvicorn backend.main:app --reload --port 8000 &
@echo "Starting frontend dev server..."
cd frontend && npm run dev
# -- Docker --------------------------------------------------------------------
build: build-backend build-frontend
build-backend:
docker build -f Dockerfile.backend -t cloudshell-backend .
build-frontend:
docker build -f Dockerfile.frontend -t cloudshell-frontend .
smoke-test:
bash scripts/smoke-test-docker.sh cloudshell-backend cloudshell-frontend
up:
@if [ ! -f .env ]; then \
echo "No .env found -- copying .env.example"; \
cp .env.example .env; \
fi
$(COMPOSE) up -d --build
down:
$(COMPOSE) down
logs:
$(COMPOSE) logs -f
restart:
$(COMPOSE) restart
shell:
$(COMPOSE) exec backend /bin/bash
# -- Tests ---------------------------------------------------------------------
_TEST_ENV = DATA_DIR=/tmp/cloudshell-test-$$(date +%s) \
SECRET_KEY=ci-test-secret \
ADMIN_USER=admin \
ADMIN_PASSWORD=admin \
TOKEN_TTL_HOURS=1 \
AUDIT_RETENTION_DAYS=7 \
CORS_ORIGINS="*"
# Full suite: pytest + coverage + vitest (mirrors CI exactly)
test:
mkdir -p reports
$(_TEST_ENV) .venv/bin/python -m pytest
cd frontend && npm test
# Fast run: no coverage instrumentation, no XML reports
test-unit:
$(_TEST_ENV) .venv/bin/python -m pytest \
--no-cov --no-header -q
cd frontend && npm test
# Full suite + open the HTML report in the default browser
test-coverage:
mkdir -p reports
$(_TEST_ENV) .venv/bin/python -m pytest
@echo ""
@echo "Opening HTML report..."
@open reports/htmlcov/index.html 2>/dev/null \
|| xdg-open reports/htmlcov/index.html 2>/dev/null \
|| echo "HTML report is at reports/htmlcov/index.html"
# Full CI gate: tests must pass before images are built
full-ci: test build
# Matrix run across all supported Python versions (requires pyenv or similar)
test-all:
@for py in python3.11 python3.12 python3.13; do \
if command -v $$py >/dev/null 2>&1; then \
echo ""; \
echo "=== $$py ==="; \
mkdir -p reports; \
$(_TEST_ENV) $$py -m pytest --no-header -q 2>&1 | tail -5; \
else \
echo "$$py not found, skipping"; \
fi; \
done
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.