ci: fall back to a reachable Debian mirror after CDN failure
Core regression / Python core and release configuration (push) Successful in 39s
Core regression / JavaScript syntax (push) Successful in 3s
Core regression / Python core and release configuration (pull_request) Successful in 1m2s
Core regression / JavaScript syntax (pull_request) Successful in 3s

This commit is contained in:
阿白叔 committed 2026-11-09 10:13:00 +08:00
1 parent b3f92e0206
commit b69b8902d7
1 file changed
+7 -1
+7 -1
View File
@@ -27,7 +27,13 @@ jobs:
[ -f "$apt_source" ] || continue
sed -i 's|http://deb.debian.org|https://deb.debian.org|g' "$apt_source"
done
apt-get -o Acquire::Retries=2 -o APT::Update::Error-Mode=any update
if ! apt-get -o Acquire::Retries=2 -o APT::Update::Error-Mode=any update; then
for apt_source in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do
[ -f "$apt_source" ] || continue
sed -i 's|https://deb.debian.org|https://mirrors.ustc.edu.cn|g' "$apt_source"
done
apt-get -o Acquire::Retries=2 -o APT::Update::Error-Mode=any update
fi
DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=2 install -y --no-install-recommends python3 python3-pytest python3-openpyxl
python3 --version
- name: Compile application and build helpers