@@ -9,36 +9,38 @@ prepare:
99 $HOME/.local/bin/cs
1010 - name : install uv standalone version
1111 command : curl -LsSf https://astral.sh/uv/install.sh | env
12- UV_INSTALL_DIR="$HOME/.local/bin/uv " sh && chmod +x $HOME/.local/bin /uv
12+ UV_INSTALL_DIR="$HOME/app " sh && chmod +x $HOME/app /uv
1313 - name : copy template .env file
1414 command : cp -n .env.sample .env
1515 - name : " set ev vars "
1616 command : . .env && cs set-env -w $WORKSPACE_ID -t $TEAM_ID --env-var
17- UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
17+ UV_PYTHON_INSTALL_DIR=$PWD/.codesphere-internal/.uv-python-install
18+ --env-var UV_PYTHON_BIN_DIR=$PWD/.codesphere-internal/.uv-python-bin
19+ --env-var UV_CACHE_DIR=$PWD/.codesphere-internal/.uv --env-var
1820 UV_PYTHON_CACHE_DIR=$PWD/.codesphere-internal/.uv-python
1921 - name : install frontend environment
20- command : cd frontend && uv venv && uv sync
22+ command : cd frontend && { [ ! -d ". venv" ] && uv venv; uv sync; }
2123 - name : install backend environment
22- command : " cd backend && uv venv && uv sync "
24+ command : cd backend && { [ ! -d ". venv" ] && uv venv; uv sync; }
2325test :
2426 steps :
2527 - name : test frontend
26- command : cd frontend && uv run pytest --junitxml=junit/test-results.xml
27- --cov-report=xml --cov-report=html --cov=. | tee pytest-coverage.txt
28+ command : cd frontend && uv run pytest
2829 - name : test backend
29- command : cd backend && uv run pytest --junitxml=junit/test-results.xml
30- --cov-report=xml --cov-report=html --cov=. | tee pytest-coverage.txt
30+ command : " cd backend && uv run pytest "
3131 - name : security check frontend
32- command : ' bandit -r . -c pyproject.toml --format=custom --msg-template
33- "{abspath}:{line}: {test_id}[{severity}]: {msg}" -o bandit-results.txt'
32+ command : ' cd frontend && uv run bandit -r . -c pyproject.toml --format=custom
33+ --msg-template "{abspath}:{line}: {test_id}[{severity}]: {msg}" -o
34+ bandit-results.txt'
3435 - name : security check backend
35- command : ' bandit -r . -c pyproject.toml --format=custom --msg-template
36- "{abspath}:{line}: {test_id}[{severity}]: {msg}" -o bandit-results.txt'
36+ command : ' cd backend && uv run bandit -r . -c pyproject.toml --format=custom
37+ --msg-template "{abspath}:{line}: {test_id}[{severity}]: {msg}" -o
38+ bandit-results.txt'
3739run :
3840 frontend :
3941 steps :
4042 - name : start frontend application
41- command : cd frontend && uv run streamlit run --server.address 0.0.0.0
43+ command : . ./env && cd frontend && uv run streamlit run --server.address 0.0.0.0
4244 --server.port 3000 main.py
4345 plan : 8
4446 replicas : 1
4951 backend :
5052 steps :
5153 - name : start backend application
52- command : cd backend && uv run uvicorn app:app --reload --port 3000 --host
53- 0.0.0.0
54+ command : . ./env && cd backend && uv run uvicorn app:app --reload --port 3000
55+ --host 0.0.0.0
5456 plan : 8
5557 replicas : 1
5658 isPublic : false
5759 api-docs :
5860 steps :
5961 - name : deploy docs
60- command : cd backend && uv run uvicorn doc:app_docs --host 0.0.0.0 --port 3000
62+ command : . ./env && cd backend && uv run uvicorn doc:app_docs --host 0.0.0.0
63+ --port 3000
6164 plan : 8
6265 replicas : 1
6366 isPublic : true
0 commit comments