test
Pure Run Build / build (push) Canceled after 1m20s

This commit is contained in:
2026-07-23 16:46:22 +08:00
parent 8a85b9857a
commit 75ff4b03d5
2 changed files with 9 additions and 36 deletions
+2 -36
View File
@@ -4,43 +4,9 @@ on: [push]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: git.vipjhzf.cn/github/ci-base:latest
steps: 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,写入腾讯云 noble24.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: 克隆当前仓库 - name: 克隆当前仓库
run: | run: |
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git . git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
+7
View File
@@ -0,0 +1,7 @@
package main
import "testing"
func TestT1(t *testing.T) {
t.Log("TestT1")
}