From 75ff4b03d5bc38c6369777a7a4157d6a4b60241e Mon Sep 17 00:00:00 2001 From: lj Date: Thu, 23 Jul 2026 16:46:22 +0800 Subject: [PATCH] test --- .gitea/workflows/go-ci.yaml | 38 ++----------------------------------- main_test.go | 7 +++++++ 2 files changed, 9 insertions(+), 36 deletions(-) create mode 100644 main_test.go diff --git a/.gitea/workflows/go-ci.yaml b/.gitea/workflows/go-ci.yaml index fee4786..ef3b919 100644 --- a/.gitea/workflows/go-ci.yaml +++ b/.gitea/workflows/go-ci.yaml @@ -4,43 +4,9 @@ on: [push] jobs: build: runs-on: ubuntu-latest + container: + image: git.vipjhzf.cn/github/ci-base:latest steps: - - name: 配置国内源并安装工具链 - run: | - set -e - - # ========== 1. 清空所有 apt 源,只留腾讯云 ========== - # 备份 - mkdir -p /etc/apt/backup - cp -r /etc/apt/sources.list* /etc/apt/backup/ 2>/dev/null || true - - # 删除 sources.list.d 下所有额外源(微软 / git PPA / git-lfs 等) - rm -f /etc/apt/sources.list.d/* - - # 清空主 sources.list,写入腾讯云 noble(24.04)源 - cat > /etc/apt/sources.list <<'EOF' - deb https://mirrors.cloud.tencent.com/ubuntu/ noble main restricted universe multiverse - deb https://mirrors.cloud.tencent.com/ubuntu/ noble-updates main restricted universe multiverse - deb https://mirrors.cloud.tencent.com/ubuntu/ noble-security main restricted universe multiverse - deb https://mirrors.cloud.tencent.com/ubuntu/ noble-backports main restricted universe multiverse - EOF - - apt-get update - apt-get install -y golang-go git nodejs npm - - # ========== 2. 配置 Go 国内源 ========== - go env -w GOPROXY=https://goproxy.cn,direct - go env -w GOSUMDB=off - # go env -w GOPRIVATE=git.yourdomain.com # 私有仓库按需开 - - # ========== 3. 配置 npm 国内源 ========== - npm config set registry https://registry.npmmirror.com - - echo "==> 源配置完成" - go version - node -v - npm -v - - name: 克隆当前仓库 run: | git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git . diff --git a/main_test.go b/main_test.go new file mode 100644 index 0000000..6d31e24 --- /dev/null +++ b/main_test.go @@ -0,0 +1,7 @@ +package main + +import "testing" + +func TestT1(t *testing.T) { + t.Log("TestT1") +}