mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-13 06:04:30 +08:00
feat(ci): 添加CI/CD工作流和CQRS命令接口
- 配置CI构建和测试工作流,支持多.NET版本和并发测试 - 添加CodeQL静态代码分析工作流 - 实现自动版本递增和标签创建工作流 - 定义CQRS命令接口规范,包括响应式和流式命令 - 为架构测试添加空值参数异常文档注释
This commit is contained in:
parent
27266d037d
commit
0cd1e9e83a
19
.github/workflows/auto-tag.yml
vendored
19
.github/workflows/auto-tag.yml
vendored
@ -5,6 +5,8 @@ on:
|
|||||||
workflows: ["CI - Build & Test"]
|
workflows: ["CI - Build & Test"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
concurrency:
|
concurrency:
|
||||||
group: auto-tag-main
|
group: auto-tag-main
|
||||||
@ -13,15 +15,16 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
auto-tag:
|
auto-tag:
|
||||||
if: >
|
if: >
|
||||||
github.ref == 'refs/heads/main' &&
|
|
||||||
(
|
(
|
||||||
(
|
github.event_name == 'workflow_run' &&
|
||||||
github.event_name == 'workflow_run' &&
|
github.event.workflow_run.conclusion == 'success' &&
|
||||||
github.event.workflow_run.conclusion == 'success' &&
|
github.event.workflow_run.head_branch == 'main' &&
|
||||||
contains(github.event.workflow_run.head_commit.message, '[release ci]')
|
contains(github.event.workflow_run.head_commit.message, '[release ci]')
|
||||||
)
|
)
|
||||||
||
|
||
|
||||||
github.event_name == 'workflow_dispatch'
|
(
|
||||||
|
github.event_name == 'workflow_dispatch' &&
|
||||||
|
github.ref == 'refs/heads/main'
|
||||||
)
|
)
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -1,12 +1,12 @@
|
|||||||
# CI/CD工作流配置:构建和测试.NET项目
|
# CI/CD工作流配置:构建和测试.NET项目
|
||||||
# 该工作流在push到main/master分支或创建pull request时触发
|
# 该工作流在推送到任意分支或创建面向任意分支的 pull request 时触发
|
||||||
name: CI - Build & Test
|
name: CI - Build & Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, master ]
|
branches: [ '**' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main, master ]
|
branches: [ '**' ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
@ -4,14 +4,14 @@ name: "CodeQL"
|
|||||||
|
|
||||||
# 触发事件配置
|
# 触发事件配置
|
||||||
# 在以下情况下触发工作流:
|
# 在以下情况下触发工作流:
|
||||||
# 1. 推送到main分支时
|
# 1. 推送到任意分支时
|
||||||
# 2. 针对main分支的拉取请求时
|
# 2. 针对任意分支的拉取请求时
|
||||||
# 3. 每天凌晨2点执行一次
|
# 3. 每天凌晨2点执行一次
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ '**' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ '**' ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *'
|
- cron: '0 2 * * *'
|
||||||
|
|
||||||
|
|||||||
@ -168,6 +168,9 @@ internal sealed class AdditionalAssemblyNotificationHandlerRegistry : ICqrsHandl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="services">目标服务集合。</param>
|
/// <param name="services">目标服务集合。</param>
|
||||||
/// <param name="logger">日志记录器。</param>
|
/// <param name="logger">日志记录器。</param>
|
||||||
|
/// <exception cref="ArgumentNullException">
|
||||||
|
/// 当 <paramref name="services" /> 或 <paramref name="logger" /> 为 <see langword="null" /> 时抛出。
|
||||||
|
/// </exception>
|
||||||
public void Register(IServiceCollection services, ILogger logger)
|
public void Register(IServiceCollection services, ILogger logger)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(services);
|
ArgumentNullException.ThrowIfNull(services);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user