-
-
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
0 parents
commit e3aad4a
Showing
25 changed files
with
1,325 additions
and
0 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,109 @@ | ||
# EditorConfig is awesome:http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Don't use tabs for indentation. | ||
[*] | ||
indent_style = space | ||
# (Please don't specify an indent_size here; that has too many unintended consequences.) | ||
|
||
# Code files | ||
[*.{cs,csx,vb,vbx}] | ||
indent_size = 4 | ||
|
||
# Xml project files | ||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}] | ||
indent_size = 2 | ||
|
||
# Xml config files | ||
[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct}] | ||
indent_size = 2 | ||
|
||
# YAML files | ||
[*.{yaml,yml}] | ||
indent_size = 2 | ||
|
||
# JSON files | ||
[*.json] | ||
indent_size = 2 | ||
|
||
# Dotnet code style settings: | ||
[*.{cs,vb}] | ||
# Sort using and Import directives with System.* appearing first | ||
dotnet_sort_system_directives_first = true | ||
# Avoid "this." and "Me." if not necessary | ||
dotnet_style_qualification_for_field = false:suggestion | ||
dotnet_style_qualification_for_property = false:suggestion | ||
dotnet_style_qualification_for_method = false:suggestion | ||
dotnet_style_qualification_for_event = false:suggestion | ||
|
||
# Use language keywords instead of framework type names for type references | ||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion | ||
dotnet_style_predefined_type_for_member_access = true:suggestion | ||
|
||
# Suggest more modern language features when available | ||
dotnet_style_object_initializer = true:suggestion | ||
dotnet_style_collection_initializer = true:suggestion | ||
dotnet_style_coalesce_expression = true:suggestion | ||
dotnet_style_null_propagation = true:suggestion | ||
dotnet_style_explicit_tuple_names = true:suggestion | ||
|
||
# CSharp code style settings: | ||
|
||
# IDE0040: Add accessibility modifiers | ||
dotnet_style_require_accessibility_modifiers = omit_if_default:error | ||
|
||
# IDE0040: Add accessibility modifiers | ||
dotnet_diagnostic.IDE0040.severity = error | ||
|
||
[*.cs] | ||
# Top-level files are definitely OK | ||
csharp_using_directive_placement = outside_namespace:silent | ||
csharp_style_namespace_declarations = block_scoped:silent | ||
csharp_prefer_simple_using_statement = true:suggestion | ||
csharp_prefer_braces = true:silent | ||
|
||
# Prefer "var" everywhere | ||
csharp_style_var_for_built_in_types = true:suggestion | ||
csharp_style_var_when_type_is_apparent = true:suggestion | ||
csharp_style_var_elsewhere = true:suggestion | ||
|
||
# Prefer method-like constructs to have an expression-body | ||
csharp_style_expression_bodied_methods = true:none | ||
csharp_style_expression_bodied_constructors = true:none | ||
csharp_style_expression_bodied_operators = true:none | ||
|
||
# Prefer property-like constructs to have an expression-body | ||
csharp_style_expression_bodied_properties = true:none | ||
csharp_style_expression_bodied_indexers = true:none | ||
csharp_style_expression_bodied_accessors = true:none | ||
|
||
# Suggest more modern language features when available | ||
csharp_style_pattern_matching_over_is_with_cast_check = true:error | ||
csharp_style_pattern_matching_over_as_with_null_check = true:error | ||
csharp_style_inlined_variable_declaration = true:suggestion | ||
csharp_style_throw_expression = true:suggestion | ||
csharp_style_conditional_delegate_call = true:suggestion | ||
|
||
# Newline settings | ||
csharp_new_line_before_open_brace = all | ||
csharp_new_line_before_else = true | ||
csharp_new_line_before_catch = true | ||
csharp_new_line_before_finally = true | ||
csharp_new_line_before_members_in_object_initializers = true | ||
csharp_new_line_before_members_in_anonymous_types = true | ||
|
||
# Test settings | ||
[**/*Tests*/**{.cs,.vb}] | ||
# xUnit1013: Public method should be marked as test. Allows using records as test classes | ||
dotnet_diagnostic.xUnit1013.severity = none | ||
|
||
# CS9113: Parameter is unread (usually, ITestOutputHelper) | ||
dotnet_diagnostic.CS9113.severity = none | ||
|
||
# Default severity for analyzer diagnostics with category 'Style' | ||
dotnet_analyzer_diagnostic.category-Style.severity = none | ||
|
||
# VSTHRD200: Use "Async" suffix for async methods | ||
dotnet_diagnostic.VSTHRD200.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# sln, csproj files (and friends) are always CRLF, even on linux | ||
*.sln text eol=crlf | ||
*.proj text eol=crlf | ||
*.csproj text eol=crlf | ||
|
||
# These are windows specific files which we may as well ensure are | ||
# always crlf on checkout | ||
*.bat text eol=crlf | ||
*.cmd text eol=crlf | ||
|
||
# Opt in known filetypes to always normalize line endings on checkin | ||
# and always use native endings on checkout | ||
*.c text | ||
*.config text | ||
*.h text | ||
*.cs text | ||
*.md text | ||
*.tt text | ||
*.txt text | ||
|
||
# Some must always be checked out as lf so enforce that for those files | ||
# If these are not lf then bash/cygwin on windows will not be able to | ||
# excute the files | ||
*.sh text eol=lf |
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,40 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: nuget | ||
directory: / | ||
schedule: | ||
interval: daily | ||
groups: | ||
Azure: | ||
patterns: | ||
- "Azure*" | ||
- "Microsoft.Azure*" | ||
Identity: | ||
patterns: | ||
- "System.IdentityModel*" | ||
- "Microsoft.IdentityModel*" | ||
System: | ||
patterns: | ||
- "System*" | ||
exclude-patterns: | ||
- "System.IdentityModel*" | ||
Extensions: | ||
patterns: | ||
- "Microsoft.Extensions*" | ||
Web: | ||
patterns: | ||
- "Microsoft.AspNetCore*" | ||
Tests: | ||
patterns: | ||
- "Microsoft.NET.Test*" | ||
- "xunit*" | ||
- "coverlet*" | ||
ThisAssembly: | ||
patterns: | ||
- "ThisAssembly*" | ||
ProtoBuf: | ||
patterns: | ||
- "protobuf-*" |
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,32 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- bydesign | ||
- dependencies | ||
- duplicate | ||
- question | ||
- invalid | ||
- wontfix | ||
- need info | ||
- docs | ||
- techdebt | ||
authors: | ||
- devlooped-bot | ||
- dependabot | ||
- github-actions | ||
categories: | ||
- title: β¨ Implemented enhancements | ||
labels: | ||
- enhancement | ||
- title: π Fixed bugs | ||
labels: | ||
- bug | ||
- title: π Documentation updates | ||
labels: | ||
- docs | ||
- title: π¨ Other | ||
labels: | ||
- '*' | ||
exclude: | ||
labels: | ||
- dependencies |
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,102 @@ | ||
# Builds and runs tests in all three supported OSes | ||
# Pushes CI feed if secrets.SLEET_CONNECTION is provided | ||
|
||
name: build | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
configuration: | ||
type: choice | ||
description: Configuration | ||
options: | ||
- Release | ||
- Debug | ||
push: | ||
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ] | ||
paths-ignore: | ||
- changelog.md | ||
- readme.md | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
PackOnBuild: true | ||
GeneratePackageOnBuild: true | ||
VersionPrefix: 42.42.${{ github.run_number }} | ||
VersionLabel: ${{ github.ref }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
MSBUILDTERMINALLOGGER: auto | ||
Configuration: ${{ github.event.inputs.configuration || 'Release' }} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
os-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.lookup.outputs.matrix }} | ||
steps: | ||
- name: π€ checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: π lookup | ||
id: lookup | ||
shell: pwsh | ||
run: | | ||
$path = './.github/workflows/os-matrix.json' | ||
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' } | ||
echo "matrix=$os" >> $env:GITHUB_OUTPUT | ||
build: | ||
needs: os-matrix | ||
name: build-${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }} | ||
steps: | ||
- name: π€ checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: π build | ||
run: dotnet build -m:1 -bl:build.binlog | ||
|
||
- name: π§ͺ test | ||
run: | | ||
dotnet tool update -g dotnet-retest | ||
dotnet retest -- --no-build | ||
- name: π logs | ||
uses: actions/upload-artifact@v3 | ||
if: runner.debug && always() | ||
with: | ||
name: logs | ||
path: '*.binlog' | ||
|
||
- name: π sleet | ||
env: | ||
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} | ||
if: env.SLEET_CONNECTION != '' | ||
run: | | ||
dotnet tool install -g --version 4.0.18 sleet | ||
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found" | ||
dotnet-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: π€ checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: β ensure format | ||
run: | | ||
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget | ||
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget |
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,9 @@ | ||
usernames-as-github-logins=true | ||
issues_wo_labels=true | ||
pr_wo_labels=true | ||
exclude-labels=bydesign,dependencies,duplicate,discussion,question,invalid,wontfix,need info,docs | ||
enhancement-label=:sparkles: Implemented enhancements: | ||
bugs-label=:bug: Fixed bugs: | ||
issues-label=:hammer: Other: | ||
pr-label=:twisted_rightwards_arrows: Merged: | ||
unreleased=false |
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,39 @@ | ||
name: changelog | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: π€ defaults | ||
uses: devlooped/actions-bot@v1 | ||
with: | ||
name: ${{ secrets.BOT_NAME }} | ||
email: ${{ secrets.BOT_EMAIL }} | ||
gh_token: ${{ secrets.GH_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: π€ checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
token: ${{ env.GH_TOKEN }} | ||
|
||
- name: β ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.3 | ||
|
||
- name: β changelog | ||
run: | | ||
gem install github_changelog_generator | ||
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/workflows/changelog.config | ||
- name: π changelog | ||
run: | | ||
git add changelog.md | ||
(git commit -m "π Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done" |
Oops, something went wrong.