-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from BigBang1112/dev
Update to .NET 8
- Loading branch information
Showing
14 changed files
with
226 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[*.cs] | ||
csharp_style_prefer_range_operator = false | ||
csharp_style_namespace_declarations = file_scoped | ||
csharp_style_prefer_primary_constructors = false | ||
|
||
dotnet_style_require_accessibility_modifiers = always | ||
dotnet_diagnostic.IDE0040.severity = warning | ||
dotnet_diagnostic.IDE0305.severity = none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
branches: [ main, dev ] | ||
pull_request: | ||
branches: [ "main" ] | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
@@ -14,18 +14,35 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build --no-restore | ||
run: dotnet build -c Release --no-restore /p:ContinuousIntegrationBuild=true | ||
|
||
- name: Test | ||
run: dotnet test --no-build --verbosity normal | ||
run: dotnet test -c Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | ||
|
||
- name: Code Coverage Report | ||
uses: irongut/[email protected] | ||
if: matrix.os == 'ubuntu-latest' | ||
with: | ||
filename: coverage/**/coverage.cobertura.xml | ||
badge: true | ||
fail_below_min: true | ||
format: text | ||
hide_branch_rate: false | ||
hide_complexity: true | ||
indicators: true | ||
output: both | ||
thresholds: '60 80' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,38 +9,56 @@ permissions: | |
packages: write | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
build-and-publish: | ||
name: Build and Publish | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set release information | ||
run: gh release edit ${{ github.ref_name }} -n "$(echo -e '***[Pre-release is being automatically created, please wait...](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})***\n\n${{ github.event.release.body }}')" | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
7.0.x | ||
6.0.x | ||
8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build -c Release --no-restore | ||
run: dotnet build -c Release --no-restore /p:ContinuousIntegrationBuild=true | ||
|
||
- name: Test | ||
run: dotnet test -c Release --no-build --verbosity normal | ||
run: dotnet test -c Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | ||
|
||
- name: Code Coverage Report | ||
uses: irongut/[email protected] | ||
with: | ||
filename: coverage/**/coverage.cobertura.xml | ||
badge: true | ||
fail_below_min: true | ||
format: text | ||
hide_branch_rate: false | ||
hide_complexity: true | ||
indicators: true | ||
output: both | ||
thresholds: '60 80' | ||
|
||
- name: Publish the package to nuget.org | ||
run: dotnet nuget push MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
|
||
- name: Publish the package to github.com | ||
run: dotnet nuget push MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg -k ${{ env.GH_TOKEN }} -s https://nuget.pkg.github.com/bigbang1112/index.json | ||
|
||
run: dotnet nuget push MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bigbang1112/index.json | ||
- name: Upload the package to this release | ||
run: gh release upload ${{ github.ref_name }} MinimalXmlReader/bin/Release/MinimalXmlReader.*.nupkg | ||
|
||
- name: Set release information | ||
run: gh release edit ${{ github.ref_name }} -n "$(echo -e '${{ github.event.release.body }}\n\nAssets were automatically generated using the [publish workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).')" |
12 changes: 2 additions & 10 deletions
12
MinimalXmlReader.Benchmarks/MiniXmlReaderExample1Benchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
namespace MinimalXmlReader; | ||
|
||
/// <summary> | ||
/// Represents the type of the end element. | ||
/// </summary> | ||
public enum EndType | ||
{ | ||
/// <summary> | ||
/// None | ||
/// </summary> | ||
None, | ||
/// <summary> | ||
/// Self-closed | ||
/// </summary> | ||
SelfClosed, | ||
/// <summary> | ||
/// Processing instruction | ||
/// </summary> | ||
ProcessingInstruction | ||
} |
Oops, something went wrong.