Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.

Commit 19bbd42

Browse files
authored
0.4 (#20)
* 1. Add FluentApiGeneratorConsole to generate ForEach APi for OVBuilder (ObjectVisitorBuilder) * fix issue about nbgv * fix issue about nbgv * Feature/ci (#13) * enable sonar and codecov * Feature/validation (#14) * Validation Support 1. Add basic support to validation 2. Add IsInRange Property Rule 3. Add > >= < <= Property Rule 4. Add IsInSet Property Rule * More Rules 1. Length MaxLength MinLength 2. ClassNull ClassNotNull 3. Enumerable Empty not EmptyRule 4. String Empty Not Empty * More rules 1. eq and neq with comparer or not 2. enhance relation validation with comparer 3. regex match or not 4. IsNotInSet * More rules 1. IsInEnum Rule. flags or not 2. Move regex factory to GlobalFactories * add ScalePrecisionRule * Support more flexible relation between rules 1. Add ValidationRelationGroup to manage relation between rules, it support And/Or/Not/Simple 2. Add Or rule relationship in entity level and property level * Add Documents * Update Crowdin configuration file * New translations Newbe.ObjectVisitor.xml (Chinese Simplified) (#15) * New translations Newbe.ObjectVisitor.xml (Chinese Simplified) (#17) * Feature/validation (#18) * Support to pack localization xml documents to package * more support to Nullable<> * More ut for property validation * New Crowdin updates (#19) * New translations Newbe.ObjectVisitor.xml (Chinese Simplified) * Update Readme
1 parent b877925 commit 19bbd42

File tree

212 files changed

+11075
-1615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+11075
-1615
lines changed

.github/main.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/dev_azure_sleet_nuget.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/dev_myget_nuget.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build and scan
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- feature/ci
9+
- feature/ut
10+
11+
pull_request:
12+
branches:
13+
- master
14+
- develop
15+
16+
jobs:
17+
build:
18+
runs-on: windows-latest
19+
env:
20+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
# Disabling shallow clone is recommended for improving relevancy of reporting
25+
fetch-depth: 0
26+
- name: Cache SonarCloud packages
27+
uses: actions/cache@v1
28+
with:
29+
path: ~\sonar\cache
30+
key: ${{ runner.os }}-sonar
31+
restore-keys: ${{ runner.os }}-sonar
32+
- name: Cache SonarCloud scanner
33+
id: cache-sonar-scanner
34+
uses: actions/cache@v1
35+
with:
36+
path: .\.sonar\scanner
37+
key: ${{ runner.os }}-sonar-scanner
38+
restore-keys: ${{ runner.os }}-sonar-scanner
39+
- uses: actions/setup-java@v1
40+
with:
41+
java-version: '11' # The JDK version to make available on the path.
42+
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
43+
architecture: x64 # (x64 or x86) - defaults to x64
44+
- name: Install SonarCloud scanner
45+
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
46+
shell: powershell
47+
run: |
48+
New-Item -Path .\.sonar\scanner -ItemType Directory
49+
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
50+
- name: Build and analyze
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
53+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
54+
shell: powershell
55+
run: |
56+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"newbe36524_Newbe.ObjectVisitor" /o:"newbe36524" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths='"src/Newbe.ObjectVisitor/*.Tests/TestResults/*/coverage.opencover.xml"' /d:sonar.scanner.force-deprecated-java-version="true"
57+
dotnet build $ENV:GITHUB_WORKSPACE/src --configuration Release
58+
dotnet test $ENV:GITHUB_WORKSPACE/src --configuration Release -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --settings $ENV:GITHUB_WORKSPACE/src/coverlet.runsettings
59+
# dotnet test $ENV:GITHUB_WORKSPACE/src --configuration Release -l "console;verbosity=detailed" --collect:"XPlat Code Coverage" --settings $ENV:GITHUB_WORKSPACE/src/coverlet.runsettings -- NUnit.Where="namespace =~ ^Newbe"
60+
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
61+
- name: Codacy Coverage Reporter
62+
shell: bash
63+
run: bash <(curl -s https://codecov.io/bash)

.github/workflows/release_nuget.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
jobs:
99
build:
1010
runs-on: windows-latest
11-
11+
env:
12+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1213
steps:
1314
- uses: actions/checkout@v2
1415
with:
@@ -17,9 +18,9 @@ jobs:
1718
- name: Setup .NET Core
1819
uses: actions/setup-dotnet@v1
1920
with:
20-
dotnet-version: 5.0.100-rc.2.20479.15
21+
dotnet-version: 5.0.100
2122

22-
- uses: aarnott/nbgv@v0.3
23+
- uses: aarnott/nbgv@master
2324
with:
2425
setAllVars: true
2526

0 commit comments

Comments
 (0)