From 3364a50c680c0f52b3127cf1c0c94448fc63561f Mon Sep 17 00:00:00 2001 From: rosemariejebbjtxbfp Date: Wed, 24 Jun 2026 06:02:28 +0000 Subject: [PATCH 1/5] ci: run Python job in python3.12+node container setup-python@v5 can't fetch CPython 3.12 on the self-hosted Gitea runner (it queries the Gitea API for actions/python-versions, which 404s), so the job silently fell back to the image's system Python 3.10 + pip 22.0.2. That old pip lacks PEP 660 editable support, so 'pip install -e' failed with 'build backend is missing the build_editable hook', and 3.10 is below the project's requires-python>=3.11 (code uses datetime.UTC). Run the job inside nikolaik/python-nodejs:python3.12-nodejs20 which bundles Python 3.12, Node 20 (for actions/checkout) and modern pip, removing the GitHub download dependency entirely. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e166a85..6da6892 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,14 +44,13 @@ jobs: python: name: Python (ingestion) runs-on: ubuntu-latest + container: + image: nikolaik/python-nodejs:python3.12-nodejs20 defaults: run: working-directory: ingestion steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - name: Install run: pip install -e ".[dev]" - name: Ruff lint -- 2.52.0 From 2aff6287d29e2535f1cce9f295aa3d46864e1aeb Mon Sep 17 00:00:00 2001 From: rosemariejebbjtxbfp Date: Wed, 24 Jun 2026 06:10:22 +0000 Subject: [PATCH 2/5] ci: re-trigger after configuring action proxy Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> -- 2.52.0 From 885f6c2b01f058a1f99838e649f482039ce23293 Mon Sep 17 00:00:00 2001 From: rosemariejebbjtxbfp Date: Wed, 24 Jun 2026 06:21:01 +0000 Subject: [PATCH 3/5] ci: re-trigger with self-hosted actions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> -- 2.52.0 From 5020fdcc19f6f1554a23beb19c463b8753faef52 Mon Sep 17 00:00:00 2001 From: rosemariejebbjtxbfp Date: Wed, 24 Jun 2026 06:24:52 +0000 Subject: [PATCH 4/5] ci: re-trigger with public gitea actions url Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> -- 2.52.0 From 17bc0ed680eff870a8f58151076bb726ab0bec0b Mon Sep 17 00:00:00 2001 From: rosemariejebbjtxbfp Date: Wed, 24 Jun 2026 06:30:03 +0000 Subject: [PATCH 5/5] ci: remove GitHub-hosted actions, manual checkout + Go from CN mirror Self-hosted Gitea runner has flaky/blocked access to github.com, causing actions/checkout and actions/setup-go to time out intermittently across all jobs. Replace them with: - manual git checkout against $GITHUB_SERVER_URL (the Gitea host, reachable from job containers) - Go installed from mirrors.aliyun.com Python job stays on the python3.12-nodejs20 container (fixes the original PEP 660 editable-install failure). No more github.com network dependency. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6da6892..d77e316 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,10 @@ on: branches: [main] pull_request: +env: + GO_VERSION: "1.23.12" + GOPROXY: "https://goproxy.cn,direct" + jobs: go: name: Go (api) @@ -25,11 +29,22 @@ jobs: env: OPENGOODS_DATABASE_URL: postgres://opengoods:opengoods@postgres:5432/opengoods?sslmode=disable steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - cache-dependency-path: api/go.sum + - name: Checkout + working-directory: ${{ github.workspace }} + run: | + git config --global --add safe.directory '*' + git init -q . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git -c protocol.version=2 fetch -q --no-tags --depth 1 origin "${GITHUB_REF}" + git checkout -q --force FETCH_HEAD + - name: Setup Go + working-directory: ${{ github.workspace }} + run: | + curl -fsSL -o /tmp/go.tgz "https://mirrors.aliyun.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" + rm -rf /usr/local/go + tar -C /usr/local -xzf /tmp/go.tgz + echo "/usr/local/go/bin" >> "$GITHUB_PATH" + echo "$HOME/go/bin" >> "$GITHUB_PATH" - name: Apply migrations working-directory: . run: | @@ -50,7 +65,14 @@ jobs: run: working-directory: ingestion steps: - - uses: actions/checkout@v4 + - name: Checkout + working-directory: ${{ github.workspace }} + run: | + git config --global --add safe.directory '*' + git init -q . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git -c protocol.version=2 fetch -q --no-tags --depth 1 origin "${GITHUB_REF}" + git checkout -q --force FETCH_HEAD - name: Install run: pip install -e ".[dev]" - name: Ruff lint @@ -76,10 +98,21 @@ jobs: env: DBURL: postgres://opengoods:opengoods@postgres:5432/opengoods?sslmode=disable steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.23" + - name: Checkout + working-directory: ${{ github.workspace }} + run: | + git config --global --add safe.directory '*' + git init -q . + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" + git -c protocol.version=2 fetch -q --no-tags --depth 1 origin "${GITHUB_REF}" + git checkout -q --force FETCH_HEAD + - name: Setup Go + run: | + curl -fsSL -o /tmp/go.tgz "https://mirrors.aliyun.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" + rm -rf /usr/local/go + tar -C /usr/local -xzf /tmp/go.tgz + echo "/usr/local/go/bin" >> "$GITHUB_PATH" + echo "$HOME/go/bin" >> "$GITHUB_PATH" - name: Install golang-migrate run: go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@v4.18.1 - name: Migrate up -- 2.52.0