Merge dev to main: Security improvements and comprehensive test infrastructure #39

Merged
jimmy merged 195 commits from dev into main 2026-04-08 01:42:27 +08:00
Showing only changes of commit 95ba45f4d4 - Show all commits
+8 -5
View File
@@ -30,8 +30,11 @@ jobs:
run: |
CACHE_KEY="python-$(cat dashboard/backend/requirements.txt dashboard/backend/requirements-dev.txt | md5sum | cut -d' ' -f1)"
CACHE_DIR="/tmp/pytest-cache/$CACHE_KEY"
PIP_CACHE_DIR="/tmp/pip-cache"
echo "CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV
echo "CACHE_KEY=$CACHE_KEY" >> $GITHUB_ENV
echo "PIP_CACHE_DIR=$PIP_CACHE_DIR" >> $GITHUB_ENV
mkdir -p "$PIP_CACHE_DIR"
if [ -d "$CACHE_DIR" ]; then
echo "Cache hit for $CACHE_KEY"
echo "cache-hit=true" >> $GITHUB_OUTPUT
@@ -45,17 +48,17 @@ jobs:
run: |
cd dashboard/backend
if [ "${{ steps.cache-python.outputs.cache-hit }}" = "true" ]; then
echo "Restoring from cache $CACHE_KEY..."
echo "Restoring venv from cache $CACHE_KEY..."
cp -a $CACHE_DIR/venv .
else
echo "Installing fresh dependencies..."
python3 -m venv venv
. venv/bin/activate
pip install --no-cache-dir -r requirements.txt
pip install --no-cache-dir -r requirements-dev.txt
pip install --no-cache-dir pytest-timeout
pip install --cache-dir=$PIP_CACHE_DIR -r requirements.txt
pip install --cache-dir=$PIP_CACHE_DIR -r requirements-dev.txt
pip install --cache-dir=$PIP_CACHE_DIR pytest-timeout
# Save to cache
echo "Saving to cache $CACHE_KEY..."
echo "Saving venv to cache $CACHE_KEY..."
cp -a venv $CACHE_DIR/
fi