-
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.
- Loading branch information
Dennis Dyatlov
committed
Dec 15, 2022
1 parent
b2300f9
commit eeecc8d
Showing
40 changed files
with
2,816 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,51 @@ | ||
name: "Check PR" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "src/**" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: "${{github.workflow}}-${{github.head_ref}}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_and_test: | ||
name: "Build & Run Tests" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Setup .NET CLI" | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "7.x" | ||
|
||
- name: "Restore Solution NuGets" | ||
run: dotnet restore | ||
|
||
- name: "Build Solution" | ||
run: dotnet build | ||
--no-restore | ||
--configuration "Release" | ||
|
||
- name: "Run Solution Tests" | ||
run: dotnet test | ||
--no-restore --no-build | ||
--configuration "Release" | ||
--settings "src/CodeCoverage.runsettings" | ||
--collect "XPlat Code Coverage" | ||
--logger "trx;logfileprefix=tr" | ||
|
||
- name: "Publish Solution Test Results" | ||
uses: actions/upload-artifact@v3 | ||
if: success() || failure() | ||
with: | ||
name: "test-results" | ||
path: "src/**/TestResults/*.trx" |
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,38 @@ | ||
name: "Release NuGets" | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish_nugets: | ||
name: "Publish NuGets" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Setup .NET CLI" | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "7.x" | ||
|
||
- name: "Restore Solution NuGets" | ||
run: dotnet restore | ||
|
||
- name: "Build Solution" | ||
run: dotnet build | ||
--no-restore | ||
--configuration "Release" | ||
|
||
- name: "Pack NuGets" | ||
run: dotnet pack | ||
--no-restore --no-build | ||
--configuration "Release" | ||
--output "nupkgs" | ||
|
||
- name: "Upload NuGets to nuget.org" | ||
run: dotnet nuget push "nupkgs/**/*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json |
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,17 @@ | ||
name: "Report Test Results" | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Check PR"] | ||
types: [completed] | ||
|
||
jobs: | ||
report_test_results: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dorny/test-reporter@v1 | ||
with: | ||
artifact: "test-results" | ||
name: "Test Results" | ||
path: "**/TestResults/*.trx" | ||
reporter: "dotnet-trx" |
Oops, something went wrong.