修复: 升级框架并完善报告导出

- 升级 Drogon 和 Trantor,修复畸形请求导致的连接计数泄漏\n- 增加第三方框架版本校验与自动重建\n- 完善完整报告导出和接口文档
This commit is contained in:
cloud
2026-08-10 09:50:09 +08:00
parent 99ed321d24
commit 0e28826073
82 changed files with 3095 additions and 566 deletions
+79 -6
View File
@@ -100,14 +100,44 @@ jobs:
- name: Prepare for testing
run: |
brew services restart postgresql@14
for _ in {1..30}; do
if pg_isready -h 127.0.0.1 -p 5432 -U postgres; then
break
fi
sleep 1
done
pg_isready -h 127.0.0.1 -p 5432 -U postgres
brew services start mariadb
for _ in {1..30}; do
if mariadb-admin ping --silent; then
break
fi
sleep 1
done
mariadb-admin ping --silent
brew services start redis
sleep 4
for _ in {1..30}; do
if redis-cli ping | grep -q PONG; then
break
fi
sleep 1
done
redis-cli ping | grep -q PONG
mariadb -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('')"
mariadb -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'"
mariadb -e "FLUSH PRIVILEGES"
brew services restart mariadb
sleep 4
for _ in {1..30}; do
if mariadb-admin ping --silent; then
break
fi
sleep 1
done
mariadb-admin ping --silent
psql -c 'create user postgres superuser;' postgres
- name: Test
@@ -178,9 +208,46 @@ jobs:
- name: Install g++
if: startsWith(matrix.compiler.cxx, 'g++') && (matrix.compiler.ver == 13 || matrix.compiler.ver == 9)
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-${{ matrix.compiler.ver }}
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.compiler.ver }} ${{ matrix.compiler.ver }}
requested="g++-${{ matrix.compiler.ver }}"
if command -v g++-${{ matrix.compiler.ver }} >/dev/null 2>&1; then
echo "g++-${{ matrix.compiler.ver }} is already available on the runner"
else
retry() {
local attempts="$1"
shift
local try=1
while true; do
"$@" && break
if [ "$try" -ge "$attempts" ]; then
return 1
fi
echo "Command failed, retrying ($try/$attempts): $*"
try=$((try + 1))
sleep 10
done
}
if retry 3 sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
retry 3 sudo apt-get update && \
retry 3 sudo apt-get install -y "$requested"; then
echo "Installed $requested from PPA"
else
echo "::warning::Failed to install $requested from Launchpad PPA (network timeout). Falling back to system g++."
if ! command -v g++ >/dev/null 2>&1; then
echo "::error::Neither $requested nor system g++ is available."
exit 1
fi
fallback_cxx="$(command -v g++)"
echo "CXX=$fallback_cxx" >> "$GITHUB_ENV"
echo "Using fallback compiler: $fallback_cxx"
exit 0
fi
fi
if command -v "$requested" >/dev/null 2>&1; then
sudo update-alternatives --install /usr/bin/g++ g++ "$(command -v "$requested")" ${{ matrix.compiler.ver }}
fi
- name: Install Clang
if: startsWith(matrix.compiler.cxx, 'clang') && matrix.compiler.ver < 13
@@ -228,7 +295,13 @@ jobs:
- name: Prepare for testing
run: |
sudo systemctl start postgresql
sleep 1
for _ in {1..30}; do
if pg_isready -h 127.0.0.1 -p 5432 -U postgres; then
break
fi
sleep 1
done
pg_isready -h 127.0.0.1 -p 5432 -U postgres
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '12345'" postgres
- name: Test