Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .config/dotnet-tools.json

This file was deleted.

43 changes: 43 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
##########################################
# Common Settings
##########################################

# This file is the top-most EditorConfig file
root = true

# All Files
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# JSON
[*.{json,json5,webmanifest}]
indent_size = 2

# Markdown
[*.{md,mdx}]
trim_trailing_whitespace = false

# Visual Studio
[*.{csproj}]
indent_size = 2

[*.cs]
# https://learn.microsoft.com/de-de/dotnet/fundamentals/code-analysis/style-rules/ide0063
dotnet_diagnostic.IDE0063.severity = none
csharp_prefer_simple_using_statement = false

# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290
dotnet_diagnostic.IDE0290.severity = none
csharp_style_prefer_primary_constructors = false

# ReSharper
# https://www.jetbrains.com/help/rider/ConvertToPrimaryConstructor.html
resharper_convert_to_primary_constructor_highlighting = none

resharper_convert_to_using_declaration_highlighting = none

resharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlighting = none
31 changes: 0 additions & 31 deletions .gitattributes

This file was deleted.

32 changes: 32 additions & 0 deletions .github/actions/build-and-test-solution/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and test solution
description: Build and test solution
inputs:
dotnet-version:
description: 'The dotnet version'
default: '9.0.x'
configuration:
description: 'The dotnet build configuration'
default: 'Release'
runs:
using: "composite"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: Restore dependencies
shell: bash
run: dotnet restore

- name: Build solution
shell: bash
run: dotnet build --configuration ${{ inputs.configuration }} --no-restore

- name: Run unit tests
shell: bash
run: |
export TEST_PROJECTS=$(find ./tests -type f -name "*.Tests.csproj")
for project in $TEST_PROJECTS; do
dotnet test --configuration ${{ inputs.configuration }} $project --no-build --verbosity Normal --logger trx --collect:"XPlat Code Coverage" --results-directory:"test-results/coverage/" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByAttribute=GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute
done
40 changes: 40 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and test

on:
push:
branches:
- main
paths:
- 'src/**'
- 'tests/**'
pull_request:
branches:
- main

# Permissions for the 'Publish test results' action
permissions:
contents: read
issues: read
checks: write
pull-requests: write

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build and test solution
uses: ./.github/actions/build-and-test-solution

- name: Publish test results
if: matrix.os == 'ubuntu-latest'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
test-results/**/*.trx
25 changes: 0 additions & 25 deletions .github/workflows/dotnet.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish NuGet

on:
push:
tags:
- v*.*.*

env:
NUGET_PACKAGE_DIR: ./nupkg
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
NUGET_SOURCE: ${{ vars.NUGET_SOURCE }}

jobs:
publish-nuget:
if: github.event.base_ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build and test solution
uses: ./.github/actions/build-and-test-solution

- name: Pack NuGet packages
run: dotnet pack --configuration Release --no-build --output $NUGET_PACKAGE_DIR

- name: Publish NuGet packages and symbols
run: dotnet nuget push $NUGET_PACKAGE_DIR/*.nupkg --api-key $NUGET_API_KEY --source $NUGET_SOURCE
Loading
Loading