Skip to content

Commit

Permalink
Initial source code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Dyatlov committed Dec 15, 2022
1 parent b2300f9 commit eeecc8d
Show file tree
Hide file tree
Showing 40 changed files with 2,816 additions and 0 deletions.
646 changes: 646 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions .github/workflows/check-pr.yaml
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"
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
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
17 changes: 17 additions & 0 deletions .github/workflows/report-test-results.yaml
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"
Loading

0 comments on commit eeecc8d

Please sign in to comment.