Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6c6d54ed
authored
Mar 03, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style: 格式化代码并更新CI配置
1 parent
8cb6f6d4
Pipeline
#58
for
6c6d54ed
failed
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
12 deletions
.gitlab-ci.yml
.gitlab-ci.yml
View file @
6c6d54e
...
...
@@ -5,19 +5,54 @@ image: node:24
# - test
# - build
# GitLab CI 配置:用于 AI 生成单元测试
# 此模板设计用于被包含在主 .gitlab-ci.yml 文件中,或作为独立配置使用。
stages
:
-
test
ai-unit-test-generation
:
# 定义所属阶段为测试阶段
stage
:
test
# 使用 Node.js 24 镜像环境运行脚本
image
:
node:24
script
:
-
echo "开始执行 AI 单元测试生成..."
# 运行 AI 生成测试脚本
-
node scripts/ci/ai-test-gen.mjs
rules
:
# 规则:在除 main 和 dev 分支以外的所有分支上运行
-
if
:
"
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
||
$CI_COMMIT_BRANCH
==
'dev'"
when
:
never
# 规则:如果是合并请求(Merge Request)触发的流水线,则不运行
-
if
:
"
$CI_PIPELINE_SOURCE
==
'push'
&&
$CI_COMMIT_BRANCH"
when
:
always
# 允许此任务失败,不会导致整个流水线失败(仅作为辅助工具)
allow_failure
:
true
variables
:
# 以下变量需要在 GitLab CI/CD 设置中配置(建议设置为 Masked 和 Protected):
# QWEN_API_KEY: 您的通义千问 (DashScope) API 密钥
# GITLAB_TOKEN: 具有 'api' 权限的 GitLab 个人访问令牌 (PAT) 或项目访问令牌。
# (CI_JOB_TOKEN 可能适用于某些操作,但通常发布评论的权限受限)
# 可选变量:
# QWEN_MODEL: "qwen-coder-plus" (推荐代码模型) 或 "qwen-plus" (默认)
# QWEN_API_URL: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions" (默认)
# 缓存配置:缓存 node_modules 和 pnpm store 以加速构建
cache
:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
-
.pnpm-store/
# 设置 pnpm 环境
before_script
:
-
corepack enable
-
corepack prepare pnpm@latest --activate
-
pnpm config set store-dir .pnpm-store
-
pnpm install --frozen-lockfile
#
cache:
#
key: ${CI_COMMIT_REF_SLUG}
#
paths:
#
- node_modules/
#
- .pnpm-store/
#
#
设置 pnpm 环境
#
before_script:
#
- corepack enable
#
- corepack prepare pnpm@latest --activate
#
- pnpm config set store-dir .pnpm-store
#
- pnpm install --frozen-lockfile
# 代码风格检查
# lint:
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment