Compare commits

...

No commits in common. "38db830523feddf26284522a595329810696ec5a" and "f0c734d302491db7da2a42e563a476a2efe8125c" have entirely different histories.

37 changed files with 1070 additions and 2 deletions

26
.devops/hello_chy.yml Normal file
View File

@ -0,0 +1,26 @@
name: hello_chy
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '""'
msg_text: '"这是来自chy的测试"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

View File

@ -0,0 +1,26 @@
name: hello_dingdingtalk
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '"hello"'
msg_text: '"this is a test message"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

25
.devops/hello_world.yml Normal file
View File

@ -0,0 +1,25 @@
name: hello_world
description: 建木快速入门从hello world开始
trigger:
type: cron
schedule: 0 0/30 * * * ?
workflow:
start:
type: start
targets:
- sayhello
sayhello:
type: qywx_notice:1.2.1
param:
bot_webhook_url: "((wecom.bot_webhook))"
text_content: "这是来自建木的第一个问候!"
sources:
- start
targets:
- end
end:
type: end
sources:
- sayhello

32
.devops/test git log.yml Normal file
View File

@ -0,0 +1,32 @@
name: test git log
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
remote_url: '"https://gitee.com/jianmu-dev/jianmu-ci-server.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 3
needs:
- start
- ref: git_log_0
name: git log
task: git_log@1.0.2
input:
git_path: git_clone_0.git_path
commit_num: 5
needs:
- git_clone_0
- ref: end
name: 结束
task: end
needs:
- git_log_0

26
.devops/wechat.yml Normal file
View File

@ -0,0 +1,26 @@
name: wechat
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wechat.wechat_bot))
msg_title: 'aaaaaa'
msg_text: '"eeeeeee"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

View File

@ -0,0 +1,48 @@
name: 仓库开发者克隆私有仓库
description: ""
global:
concurrent: false
trigger:
type: cron
schedule: 0 30 14 * * ?
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
username: ((chytest3.user))
password: ((chytest3.pwd))
remote_url: '"hhttps://testgitea2.trustie.net/postman/test_jiammu.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 100
needs:
- start
- ref: git_log_0
name: git log
task: git_log@1.0.2
input:
git_path: git_clone_0.git_path
commit_num: 5
needs:
- git_clone_0
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '""'
msg_text: git_log_0.git_log
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- git_log_0

View File

@ -0,0 +1,29 @@
name: 仓库推送代码
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_push_0
name: git push
task: git_push@1.0.6
input:
username: ((testgitea.user))
password: ((testgitea.pwd))
remote_url: '"https://testgitea2.trustie.net/gitgit/testdevops.git"'
remote_branch: '"master"'
source_path: '""'
target_dir: '"/."'
commit_message: '"jianmu default commit message"'
committer_name: '"jianmu"'
committer_email: '"jianmu@example.com"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- git_push_0

View File

@ -0,0 +1,59 @@
name: 克隆项目,获取项目的log,向企业微信/钉钉发送消息
description: |-
1. 第一步克隆项目指定commit id
2. 第二步获取克隆项目的指定次数的commit log
3. 第三步:同时向钉钉/企业微信发送git_log
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.4
input:
username: ((testgitea.user))
password: ((testgitea.pwd))
remote_url: '"https://testgitea2.trustie.net/gitgit/testdevops.git"'
ref: '"refs/heads/master"'
commit_id: '"c3e9c6bb1e"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0
- qywx_notice_0
- ref: git_log_0
name: git log
task: git_log@1.0.2
input:
git_path: git_clone_0.git_path
commit_num: 5
needs:
- git_clone_0
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '"gitlog"'
msg_text: git_log_0.git_log
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- git_log_0
- ref: qywx_notice_0
name: 企业微信通知
task: qywx_notice@1.2.1-text
input:
bot_webhook_url: ((wechat.wechat_bot))
text_content: git_log_0.git_log
mentioned_list: '"[]"'
mentioned_mobile_list: '"[]"'
needs:
- git_log_0

View File

@ -0,0 +1,24 @@
name: 克隆项目并获取项目的log2222
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.4
input:
username: ((testgitea.user))
password: ((testgitea.pwd))
remote_url: "https://testgitea2.trustie.net/gitgit/testdevops.git"
ref: '"refs/heads/master"'
commit_id: '""'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- git_clone_0

View File

@ -0,0 +1,26 @@
name: 向钉钉发送hello
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '"hello"'
msg_text: '"hello chy 0802"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

View File

@ -0,0 +1,37 @@
name: 定时器的试验
description: ""
global:
concurrent: false
trigger:
type: cron
schedule: 0 16 09 * * ?
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
username: ((testgitea.user))
password: ((testgitea.pwd))
remote_url: '"https://testgitea2.trustie.net/gitgit/MiniCanvas.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 100
needs:
- start
- ref: git_log_0
name: git log
task: git_log@1.0.2
input:
git_path: git_clone_0.git_path
commit_num: 10
needs:
- git_clone_0
- ref: end
name: 结束
task: end
needs:
- git_log_0

View File

@ -0,0 +1,26 @@
name: 开发者clone私有仓库
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
username: ((chytest3.user))
password: ((chytest3.pwd))
remote_url: '"https://testgitea2.trustie.net/postman/test_jiammu.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 100
needs:
- start
- ref: end
name: 结束
task: end
needs:
- git_clone_0

View File

@ -0,0 +1,26 @@
name: 未命名项目111111111111111111111111111111111111111111111111111111111111111111111
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '"hello"'
msg_text: '"this is a test message"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

View File

@ -0,0 +1,26 @@
name: 未命名项目111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '"hello"'
msg_text: '"this is a test message"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

View File

@ -0,0 +1,25 @@
name: 管理者clone私有仓库
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
username: ((postman.user))
password: ((postman.pwd))
remote_url: '"https://testgitea2.trustie.net/postman/test_jiammu.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 100
needs:
- start
- ref: end
name: 结束
task: end
needs:
- git_clone_0

View File

@ -0,0 +1,25 @@
name: 组织ownerclone私有仓库
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
username: ((postman.user))
password: ((postman.pwd))
remote_url: '"https://testgitea2.trustie.net/test_jianmu_team/bot.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 100
needs:
- start
- ref: end
name: 结束
task: end
needs:
- git_clone_0

View File

@ -0,0 +1,25 @@
name: 组织报告者clone私有仓库
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: git_clone_0
name: git clone
task: git_clone@1.2.5
input:
username: ((chytest3.user))
password: ((chytest3.pwd))
remote_url: '"https://testgitea2.trustie.net/test_jianmu_team/bot.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 100
needs:
- start
- ref: end
name: 结束
task: end
needs:
- git_clone_0

View File

@ -0,0 +1,24 @@
name: 给企业微信发送hello
description: ""
global:
concurrent: false
workflow:
- ref: start
name: 开始
task: start
- ref: qywx_notice_0
name: 企业微信通知
task: qywx_notice@1.2.1-text
input:
bot_webhook_url: ((wechat.wechat_bot))
text_content: '"hello this is message"'
mentioned_list: '"[]"'
mentioned_mobile_list: '"[]"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- qywx_notice_0

View File

@ -0,0 +1,36 @@
version: 2
name: 项目有推送发送钉钉消息
description: ""
global:
concurrent: false
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset:
- param-ref: branch
operator: INCLUDE
value: '"master"'
ruleset-operator: AND
workflow:
- ref: dingtalk_notice_action_card_0
name: 钉钉通知-ActionCard
task: dingtalk_notice_action_card@1.0.2
input:
boot_webhook_url: ((wecom.bot_webhook))
msg_title: '"push"'
msg_text: '"hello views有代码提交啦"'
single_title: '""'
single_url: '""'
btns: '"[]"'
needs:
- start
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- dingtalk_notice_action_card_0

135
.editorconfig Normal file
View File

@ -0,0 +1,135 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
###############################
# Core EditorConfig Options #
###############################
root=true
# All files
[*]
indent_style = space
# shell files
[*.{cmd,sh,bat}]
insert_final_newline = true
trim_trailing_whitespace = true
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8-bom
[*.{json,yml,xml,csproj,props}]
indent_size = 2
###############################
# .NET Coding Conventions #
###############################
[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first = false
# this. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_readonly_field = true:suggestion
# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
dotnet_prefer_inferred_tuple_names = true:suggestion
dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
###############################
# Naming Conventions #
###############################
# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
dotnet_naming_symbols.constant_fields.required_modifiers = const
###############################
# C# Coding Conventions #
###############################
[*.cs]
# var preferences
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = true:silent
# Expression-bodied members
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
# Pattern matching preferences
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
# Null-checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# Expression-level preferences
csharp_prefer_braces = true:silent
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
###############################
# C# Formatting Rules #
###############################
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
# Space preferences
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
csharp_style_namespace_declarations=file_scoped:silent
###############################
# VB Coding Conventions #
###############################
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
[*.cs]
# Add file header
file_header_template = Copyright (c) Argo Zhang (argo@163.com). All rights reserved.\nLicensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.\nWebsite: https://admin.blazor.zone

1
222 Normal file
View File

@ -0,0 +1 @@
222

2
2333 Normal file
View File

@ -0,0 +1,2 @@
34213111
2231

1
42 Normal file
View File

@ -0,0 +1 @@
4224

View File

@ -0,0 +1,20 @@
{
"solution": {
"path": "BootstrapAdmin.sln",
"projects": [
"src\\blazor\\admin\\BootstrapAdmin.Caching\\BootstrapAdmin.Caching.csproj",
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.Models\\BootstrapAdmin.DataAccess.Models.csproj",
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.PetaPoco\\BootstrapAdmin.DataAccess.PetaPoco.csproj",
"src\\blazor\\admin\\BootstrapAdmin.Web.Core\\BootstrapAdmin.Web.Core.csproj",
"src\\blazor\\admin\\BootstrapAdmin.Web\\BootstrapAdmin.Web.csproj",
"src\\blazor\\client\\BootstrapClient.DataAccess\\BootstrapClient.DataAccess.PetaPoco.csproj",
"src\\blazor\\client\\BootstrapClient.Shared\\BootstrapClient.Web.Shared.csproj",
"src\\blazor\\client\\BootstrapClient.Web.Core\\BootstrapClient.Web.Core.csproj",
"src\\blazor\\client\\BootstrapClient.Web.Models\\BootstrapClient.DataAccess.Models.csproj",
"src\\blazor\\client\\BootstrapClient.Web\\BootstrapClient.Web.csproj",
"src\\mvc\\admin\\Bootstrap.Admin\\Bootstrap.Admin.csproj",
"src\\mvc\\admin\\Bootstrap.DataAccess\\Bootstrap.DataAccess.csproj",
"test\\UnitTest\\UnitTest.csproj"
]
}
}

View File

@ -1,2 +0,0 @@
# sync_ceshi

20
README_en.md Normal file
View File

@ -0,0 +1,20 @@
# 英文readme
# 建议
<div align="center"">
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
</div>
# 用户反馈
<p>
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
</p>

20
README_zh.md Normal file
View File

@ -0,0 +1,20 @@
# 中文readme
# 建议
<div align="center"">
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
</div>
# 用户反馈
<p>
<a href="https://github.com/xuri/excelize/actions/workflows/go.yml"><img src="https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg" alt="Build Status"></a>
<a href="https://codecov.io/gh/qax-os/excelize"><img src="https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg" alt="Code Coverage"></a>
<a href="https://goreportcard.com/report/github.com/xuri/excelize/v2"><img src="https://goreportcard.com/badge/github.com/xuri/excelize/v2" alt="Go Report Card"></a>
<a href="https://pkg.go.dev/github.com/xuri/excelize/v2"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
<a href="https://opensource.org/licenses/BSD-3-Clause"><img src="https://img.shields.io/badge/license-bsd-orange.svg" alt="Licenses"></a>
<a href="https://www.paypal.com/paypalme/xuri"><img src="https://img.shields.io/badge/Donate-PayPal-green.svg" alt="Donate"></a>
</p>

3
aaa.py Normal file
View File

@ -0,0 +1,3 @@
print("heelo")
ssss

5
aaaa Normal file
View File

@ -0,0 +1,5 @@
ersonal access tokens
Tokens you have generated that can be used to access the GitHub API.
Make sure to copy your personal access token now. You wont be able to see it again!

5
bbb.txt Normal file
View File

@ -0,0 +1,5 @@
Personal access tokens
Tokens you have generated that can be used to access the GitHub API.
Make sure to copy your personal access token now. You wont be able to see it again!

BIN
db.sqlite3 Normal file

Binary file not shown.

19
jsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

1
ok.py Normal file
View File

@ -0,0 +1 @@
print("ok")

0
test.html Normal file
View File

5
test/babel.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

76
test_login_api.py Normal file
View File

@ -0,0 +1,76 @@
# -*- coding: utf-8 -*-
# @Time : 2021/8/14 23:46
# @Author : Flora.Chen
# @File : test_login_ui.py
# @Software: PyCharm
# @Desc:
from test_api import os, API_DATA, BaseApi, json, pytest, operate_deepdiff, logger, EnvData, extras
from utils.otherUtils.handle_eval_data import eval_data_process
def check_case_data():
data = EnvData.check_data(os.path.join(API_DATA, "login_data.yaml"))
return data
@pytest.mark.api
@pytest.mark.loginapi
class TestLoginApi:
"""
登录的API测试用例
"""
cases = check_case_data()
logger.debug("测试一下这部分代码是否运行")
@pytest.mark.parametrize("case", cases, ids=["{}".format(case["title"]) for case in cases])
def test_login_api(self, case, env_users, extra):
"""
测试登录接口的测试用例
"""
if case["is_run"] is False:
reason = f"该用例:[{case['title']}], 用例文件设置了暂时跳过, is_run=false"
logger.info(reason)
pytest.skip(reason)
logger.info("--------------开始执行用例--------------")
logger.info(f"用例标题:{case['title']}")
logger.info(f"初始用例数据:{case}")
host, users = env_users
# 给测试数据类设置类属性,方便后面用例数据的替换
setattr(EnvData, "login", users["reporter"]["user"])
setattr(EnvData, "password", users["reporter"]["pwd"])
setattr(EnvData, "username", users["reporter"]["nickname"])
setattr(EnvData, "user_id", users["reporter"]["id"])
# 替换用例数据
case = EnvData.replace_data(json.dumps(case, ensure_ascii=False))
case = json.loads(case)
case["url"] = host + case["url"]
logger.info(f"替换后的用例数据:{case}")
extra.append(extras.text(str(case), name="替换后的用例数据"))
# 断言
try:
response = BaseApi().send_request(**case)
actual = response.json()
expected = eval_data_process(case['assert']['expected_response'])
logger.info(f"预期结果:{expected}\n实际结果:{actual}")
extra.append(extras.text(f"预期结果:{expected}\n实际结果:{actual}", name="测试结果"))
if case["assert"].get("expected_response_code"):
assert response.status_code == case["assert"]["expected_response_code"]
if case["assert"].get("expected_response"):
operate_deepdiff(case["assert"]["expected_response"], actual,
{"exclude_paths": {"root['image_url']", "root['is_watch']", "root['admin']",
"root['user_identity']"}})
except AttributeError as e:
logger.error(f"断言时遇到了异常:{e},当前用例:【{case['title']}】测试失败")
raise e
else:
logger.info(f"当前用例:【{case['title']}】测试通过")
finally:
logger.info("--------------当前用例执行完毕--------------")

186
validation-strategy.js Normal file
View File

@ -0,0 +1,186 @@
/**
* @filedescription Merge Strategy Tests
*/
/* global it, describe, beforeEach */
"use strict";
//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------
const assert = require("chai").assert;
const { ValidationStrategy } = require("../src/");
//-----------------------------------------------------------------------------
// Class
//-----------------------------------------------------------------------------
describe("ValidationStrategy", () => {
describe("boolean", () => {
it("should not throw an error when the value is a boolean", () => {
ValidationStrategy.boolean(true);
});
it("should throw an error when the value is null", () => {
assert.throws(() => {
ValidationStrategy.boolean(null);
}, /Expected a Boolean/);
});
it("should throw an error when the value is a string", () => {
assert.throws(() => {
ValidationStrategy.boolean("foo");
}, /Expected a Boolean/);
});
it("should throw an error when the value is a number", () => {
assert.throws(() => {
ValidationStrategy.boolean(123);
}, /Expected a Boolean/);
});
it("should throw an error when the value is an object", () => {
assert.throws(() => {
ValidationStrategy.boolean({});
}, /Expected a Boolean/);
});
});
describe("number", () => {
it("should not throw an error when the value is a number", () => {
ValidationStrategy.number(25);
});
it("should throw an error when the value is null", () => {
assert.throws(() => {
ValidationStrategy.number(null);
}, /Expected a number/);
});
it("should throw an error when the value is a string", () => {
assert.throws(() => {
ValidationStrategy.number("foo");
}, /Expected a number/);
});
it("should throw an error when the value is a boolean", () => {
assert.throws(() => {
ValidationStrategy.number(true);
}, /Expected a number/);
});
it("should throw an error when the value is an object", () => {
assert.throws(() => {
ValidationStrategy.number({});
}, /Expected a number/);
});
});
describe("object", () => {
it("should not throw an error when the value is an object", () => {
ValidationStrategy.object({});
});
it("should throw an error when the value is null", () => {
assert.throws(() => {
ValidationStrategy.object(null);
}, /Expected an object/);
});
it("should throw an error when the value is a string", () => {
assert.throws(() => {
ValidationStrategy.object("");
}, /Expected an object/);
});
});
describe("array", () => {
it("should not throw an error when the value is an array", () => {
ValidationStrategy.array([]);
});
it("should throw an error when the value is null", () => {
assert.throws(() => {
ValidationStrategy.array(null);
}, /Expected an array/);
});
it("should throw an error when the value is a string", () => {
assert.throws(() => {
ValidationStrategy.array("");
}, /Expected an array/);
});
it("should throw an error when the value is an object", () => {
assert.throws(() => {
ValidationStrategy.array({});
}, /Expected an array/);
});
});
describe("object?", () => {
it("should not throw an error when the value is an object", () => {
ValidationStrategy["object?"]({});
});
it("should not throw an error when the value is null", () => {
ValidationStrategy["object?"](null);
});
it("should throw an error when the value is a string", () => {
assert.throws(() => {
ValidationStrategy["object?"]("");
}, /Expected an object/);
});
});
describe("string", () => {
it("should not throw an error when the value is a string", () => {
ValidationStrategy.string("foo");
});
it("should not throw an error when the value is an empty string", () => {
ValidationStrategy.string("");
});
it("should throw an error when the value is null", () => {
assert.throws(() => {
ValidationStrategy.string(null);
}, /Expected a string/);
});
it("should throw an error when the value is an object", () => {
assert.throws(() => {
ValidationStrategy.string({});
}, /Expected a string/);
});
});
describe("string!", () => {
it("should not throw an error when the value is an string", () => {
ValidationStrategy["string!"]("foo");
});
it("should throw an error when the value is an empty string", () => {
assert.throws(() => {
ValidationStrategy["string!"]("");
}, /Expected a non-empty string/);
});
it("should throw an error when the value is null", () => {
assert.throws(() => {
ValidationStrategy["string!"](null);
}, /Expected a non-empty string/);
});
it("should throw an error when the value is an object", () => {
assert.throws(() => {
ValidationStrategy["string!"]({});
}, /Expected a non-empty string/);
});
});
});