fix(ci): 修复auto-merge缺少GITEA_API_TOKEN环境变量
CI/CD Pipeline / Frontend Lint (push) Successful in 58s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 1m36s
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Failing after 7s
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped

1. 给auto-merge.yml的两个merge step添加GITEA_API_TOKEN环境变量,复用REVIEW_GITEA_TOKEN secret
2. 修复tests.yml的checkout步骤GITHUB_TOKEN和Python命令
3. 给main分支ci-cd.yml的单元测试增加Redis服务,修复Celery相关测试失败
This commit was merged in pull request #430.
This commit is contained in:
2026-07-17 09:02:33 +08:00
parent 0c9375ff32
commit df08161630
3 changed files with 31 additions and 2 deletions
+4
View File
@@ -13,9 +13,13 @@ jobs:
uses: actions/checkout@v3
- name: Auto merge develop PRs
env:
GITEA_API_TOKEN: ${{ secrets.REVIEW_GITEA_TOKEN }}
run: |
bash scripts/auto_merge_prs.sh develop
- name: Auto merge main PRs (release only)
env:
GITEA_API_TOKEN: ${{ secrets.REVIEW_GITEA_TOKEN }}
run: |
bash scripts/auto_merge_prs.sh main
+21
View File
@@ -128,6 +128,27 @@ jobs:
grep -q "Running upgrade" /tmp/alembic-upgrade.sql
python3 scripts/check_schema_metadata.py
- name: Start Redis for unit tests
shell: sh
run: |
set -eu
docker rm -f ci-redis-validate 2>/dev/null || true
docker run -d --name ci-redis-validate \
-p 6379:6379 \
--health-cmd "redis-cli ping" \
--health-interval 2s \
--health-timeout 2s \
--health-retries 15 \
redis:7-alpine
for i in $(seq 1 20); do
if docker inspect --format='{{.State.Health.Status}}' ci-redis-validate 2>/dev/null | grep -q healthy; then
echo "Redis is ready"
break
fi
echo "Waiting for Redis... ($i/20)"
sleep 1
done
docker inspect --format='{{.State.Health.Status}}' ci-redis-validate | grep -q healthy
- name: Run unit tests
shell: sh
env:
+6 -2
View File
@@ -11,9 +11,11 @@ jobs:
steps:
- name: Checkout code
shell: sh
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -eu
python - <<'PY'
python3 - <<'PY'
import io
import os
import tarfile
@@ -93,9 +95,11 @@ jobs:
steps:
- name: Checkout code
shell: sh
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -eu
python - <<'PY'
python3 - <<'PY'
import io
import os
import tarfile