3f6e8187cf
CI / backend-test (push) Failing after 16m6s
- .gitea/workflows/ci.yml:push(dev)/PR 触发 ./mvnw -B clean test,与本地门禁同一命令 - 服务器侧启用前提(开启 Actions、注册带 Docker 的 act_runner)已写入文件头注释;未启用时本文件无副作用 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
32 lines
1.2 KiB
YAML
32 lines
1.2 KiB
YAML
# Gitea Actions 门禁:与 docs/development/git-workflow.md 的本地门禁完全同一条命令。
|
||
#
|
||
# 启用前提(服务器侧,一次性):
|
||
# 1. Gitea ≥ 1.19 且管理端开启 Actions(app.ini: [actions] ENABLED=true,
|
||
# 仓库 Settings → Actions 启用)。
|
||
# 2. 注册一个 act_runner,且 runner 所在主机具备:
|
||
# - Docker(Testcontainers 需要,跑 postgres:18 一次性容器)
|
||
# - 标签 ubuntu-latest 映射到含 bash/git 的镜像,或 host 模式执行
|
||
# 3. 若 runner 无法访问 github.com 拉取 actions/*,可在 runner 配置
|
||
# [actions].DEFAULT_ACTIONS_URL 指向镜像源,或将下方 setup-java 步骤
|
||
# 替换为直接使用预装 JDK 17 的 runner 镜像并删除该步骤。
|
||
#
|
||
# 未启用 Actions 时本文件无副作用。
|
||
name: CI
|
||
|
||
on:
|
||
push:
|
||
branches: [dev]
|
||
pull_request:
|
||
|
||
jobs:
|
||
backend-test:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/setup-java@v4
|
||
with:
|
||
distribution: temurin
|
||
java-version: '17'
|
||
# 与本地门禁同一命令;BUILD SUCCESS 且 0 失败方可合入(git-workflow.md)
|
||
- run: ./mvnw -B clean test
|