diff --git a/.gitea/workflows/auto-merge.yml b/.gitea/workflows/auto-merge.yml index d4a29622a..0d2722dfc 100644 --- a/.gitea/workflows/auto-merge.yml +++ b/.gitea/workflows/auto-merge.yml @@ -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 diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 90caef5ae..3bcc81d9d 100755 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -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: diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index f8ffeb555..773129aca 100755 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -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