mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
ci: configure build and dependency automation
This commit is contained in:
1 parent
9d6515d8fa
commit
f68327b857
6 files changed
+202
-2
No files matched your search
@@ -0,0 +1,60 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: maven
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "09:00"
|
||||
timezone: Asia/Shanghai
|
||||
open-pull-requests-limit: 5
|
||||
# 默认只自动处理 Maven patch 升级;LangChain4j 小版本升级也交给 Dependabot 自动建 PR。
|
||||
allow:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- version-update:semver-patch
|
||||
- dependency-name: "dev.langchain4j:*"
|
||||
update-types:
|
||||
- version-update:semver-minor
|
||||
ignore:
|
||||
# major 升级涉及迁移风险,仍保留人工评估。
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- version-update:semver-major
|
||||
commit-message:
|
||||
prefix: chore(deps)
|
||||
groups:
|
||||
# LangChain4j 单独分组,避免与普通 Maven patch 升级混在一个 PR。
|
||||
langchain4j:
|
||||
patterns:
|
||||
- "dev.langchain4j:*"
|
||||
update-types:
|
||||
- patch
|
||||
- minor
|
||||
maven-dependencies:
|
||||
patterns:
|
||||
- "*"
|
||||
exclude-patterns:
|
||||
- "dev.langchain4j:*"
|
||||
update-types:
|
||||
- patch
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "09:30"
|
||||
timezone: Asia/Shanghai
|
||||
open-pull-requests-limit: 3
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types:
|
||||
- version-update:semver-minor
|
||||
- version-update:semver-major
|
||||
commit-message:
|
||||
prefix: ci(deps)
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
@@ -0,0 +1,74 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
maven-build:
|
||||
name: Maven build (Java ${{ matrix.java-version }})
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java-version: ['17', '25']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ matrix.java-version }}
|
||||
cache: maven
|
||||
|
||||
- name: Add JDK 25 annotation processor profile
|
||||
if: matrix.java-version == '25'
|
||||
run: |
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
|
||||
pom = Path('pom.xml')
|
||||
content = pom.read_text()
|
||||
profile = '''\
|
||||
<profile>
|
||||
<id>jdk25-annotation-processor</id>
|
||||
<activation>
|
||||
<jdk>[25,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
'''
|
||||
|
||||
marker = ' </profiles>'
|
||||
if marker not in content:
|
||||
raise SystemExit('Cannot find root pom.xml profiles section.')
|
||||
if 'jdk25-annotation-processor' not in content:
|
||||
content = content.replace(marker, profile + marker, 1)
|
||||
pom.write_text(content)
|
||||
PY
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn -B -ntp clean install
|
||||
+3
-1
@@ -66,6 +66,8 @@ node_modules
|
||||
### claude code ###
|
||||
.claude
|
||||
docs
|
||||
docs/plans/
|
||||
|
||||
### test
|
||||
aitest
|
||||
aitest
|
||||
.vectorex
|
||||
@@ -0,0 +1,23 @@
|
||||
- 提问务必按以下模板,提交详细信息。
|
||||
|
||||
- 错误信息多多益善、错误截图多多益善。
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
### 环境信息
|
||||
- pigx版本:
|
||||
|
||||
- 是否修改包名:
|
||||
|
||||
### 提供详细日志、截图、回显步骤
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# 使用说明 V6.0 - 单体架构版本
|
||||
# 1. 先构建单体 JAR: mvn clean install -Pboot -DskipTests
|
||||
# 2. 启动服务: docker compose -f docker-compose-boot.yml up -d
|
||||
# 3. 静静等待服务启动
|
||||
services:
|
||||
pigx-mysql:
|
||||
build:
|
||||
context: ./db
|
||||
environment:
|
||||
MYSQL_ROOT_HOST: "%"
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
restart: always
|
||||
container_name: pigx-mysql
|
||||
image: pigx-mysql
|
||||
command: --lower_case_table_names=1
|
||||
networks:
|
||||
- spring_cloud_default
|
||||
|
||||
pigx-redis:
|
||||
container_name: pigx-redis
|
||||
image: registry.cn-hangzhou.aliyuncs.com/dockerhub_mirror/redis
|
||||
restart: always
|
||||
networks:
|
||||
- spring_cloud_default
|
||||
|
||||
# 单体的时候注意,服务名称命名为 pigx-gateway 对应前端nginx 配置
|
||||
pigx-gateway:
|
||||
build:
|
||||
context: ./pigx-boot
|
||||
restart: always
|
||||
container_name: pigx-boot
|
||||
image: pigx-boot
|
||||
ports:
|
||||
- 9999:9999
|
||||
networks:
|
||||
- spring_cloud_default
|
||||
|
||||
networks:
|
||||
spring_cloud_default:
|
||||
name: spring_cloud_default
|
||||
driver: bridge
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# 使用说明 V5.11 - 微服务架构版本
|
||||
# 使用说明 V6.0 - 微服务架构版本
|
||||
# 1. 使用docker-compose 宿主机不需要配置host来发现
|
||||
# 2. 无需修改源码,根目录 docker-compose up 即可
|
||||
# 3. 静静等待服务启动
|
||||
|
||||
Reference in new issue
Block a user