Skip to content

Commit 8ca8a01

Browse files
authored
Add support for cloudschema events (#204)
* Add support for cloudschema events
1 parent 50e55f4 commit 8ca8a01

76 files changed

Lines changed: 7713 additions & 1849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"csharpier": {
6+
"version": "1.2.3",
7+
"commands": [
8+
"csharpier"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

src/.editorconfig renamed to .editorconfig

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ indent_size = 4
3333
[*.cs]
3434
# misc
3535
dotnet_sort_system_directives_first = true
36-
max_line_length = 180
36+
# Note: CSharpier enforces a print width of 100 by default, so this is mainly for editor guidance
37+
max_line_length = 100
3738

3839
# indentation and white space
3940
indent_size = 4
@@ -46,6 +47,14 @@ csharp_indent_braces = fals
4647
csharp_indent_case_contents = true
4748
csharp_indent_labels = one_less_than_current
4849
csharp_indent_switch_labels = true
50+
51+
# namespace declarations (C# 10+)
52+
csharp_style_namespace_declarations = file_scoped : warning
53+
54+
# using directives
55+
csharp_using_directive_placement = outside_namespace : warning
56+
57+
# spacing
4958
csharp_space_after_cast = false
5059
csharp_space_after_colon_in_inheritance_clause = true
5160
csharp_space_after_comma = true
@@ -83,13 +92,28 @@ csharp_style_expression_bodied_operators = fals
8392
csharp_style_expression_bodied_properties = true : none
8493
csharp_style_expression_bodied_indexers = true : none
8594
csharp_style_expression_bodied_accessors = true : none
95+
csharp_style_expression_bodied_local_functions = false : none
96+
csharp_style_expression_bodied_lambdas = true : suggestion
8697

8798
# Suggest more modern language features when available
8899
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
89100
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
90101
csharp_style_inlined_variable_declaration = true : suggestion
91102
csharp_style_throw_expression = true : suggestion
92103
csharp_style_conditional_delegate_call = true : suggestion
104+
csharp_style_prefer_switch_expression = true : suggestion
105+
csharp_style_prefer_not_pattern = true : suggestion
106+
csharp_style_prefer_pattern_matching = true : suggestion
107+
csharp_style_prefer_null_check_over_type_check = true : suggestion
108+
109+
# target-typed new (C# 9+)
110+
csharp_style_implicit_object_creation_when_type_is_apparent = true : suggestion
111+
112+
# primary constructors (C# 12+) - not used in this codebase
113+
csharp_style_prefer_primary_constructors = false : none
114+
115+
# collection expressions (C# 12+) - not used in this codebase
116+
dotnet_style_prefer_collection_expression = false : none
93117

94118
# newline & brace settings
95119
csharp_new_line_before_open_brace = all
@@ -118,6 +142,15 @@ dotnet_style_null_propagation = true
118142
dotnet_style_object_initializer = true : suggestion
119143
dotnet_style_predefined_type_for_locals_parameters_members = true : suggestion
120144
dotnet_style_predefined_type_for_member_access = true : suggestion
145+
dotnet_style_prefer_auto_properties = true : suggestion
146+
dotnet_style_prefer_compound_assignment = true : suggestion
147+
dotnet_style_prefer_conditional_expression_over_assignment = true : suggestion
148+
dotnet_style_prefer_conditional_expression_over_return = true : suggestion
149+
dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
150+
dotnet_style_prefer_inferred_tuple_names = true : suggestion
151+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true : suggestion
152+
dotnet_style_prefer_simplified_boolean_expressions = true : suggestion
153+
dotnet_style_prefer_simplified_interpolation = true : suggestion
121154

122155
# custom resharper settings
123156
# https://www.jetbrains.com/help/resharper/EditorConfig_Index.html

.github/dependabot.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
11
version: 2
22

33
updates:
4-
- package-ecosystem: "NuGet"
4+
- package-ecosystem: "nuget"
55
directory: "/src"
66
schedule:
7-
interval: "daily"
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
commit-message:
11+
prefix: "deps(nuget)"
12+
labels:
13+
- "dependencies"
14+
- "nuget"
15+
groups:
16+
minor-and-patch:
17+
patterns:
18+
- "*"
19+
update-types:
20+
- "minor"
21+
- "patch"
822

923
- package-ecosystem: "github-actions"
1024
directory: "/"
1125
schedule:
12-
interval: "daily"
26+
interval: "weekly"
27+
day: "monday"
28+
open-pull-requests-limit: 5
29+
commit-message:
30+
prefix: "deps(actions)"
31+
labels:
32+
- "dependencies"
33+
- "github-actions"
34+
groups:
35+
actions:
36+
patterns:
37+
- "*"

.github/workflows/ci.yml

Lines changed: 49 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1-
name: ci
2-
# Continuous integration action which will fire on any push to a branch that is part of a pull request.
1+
name: CI
32

43
on:
4+
push:
5+
branches: [master, main]
6+
paths-ignore:
7+
- "**.md"
8+
- "docs/**"
59
pull_request:
6-
types: [opened, synchronize, reopened]
7-
10+
branches: [master, main]
11+
paths-ignore:
12+
- "**.md"
13+
- "docs/**"
814
workflow_dispatch:
915

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: read
22+
1023
env:
11-
DOTNET_VERSION: 10.0.x
24+
DOTNET_VERSION: "10.0.x"
25+
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
26+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
27+
DOTNET_NOLOGO: "true"
1228
SOLUTION_PATH: ./src/AzureEventGridSimulator.sln
1329
CONFIGURATION: Release
1430

1531
jobs:
1632
build-and-test:
33+
name: Build & Test (${{ matrix.os }})
1734
runs-on: ${{ matrix.os }}
1835
strategy:
36+
fail-fast: false
1937
matrix:
2038
os: [windows-latest, ubuntu-latest, macos-latest]
2139
include:
@@ -25,54 +43,45 @@ jobs:
2543
runtime: linux-x64
2644
- os: macos-latest
2745
runtime: osx-arm64
28-
env:
29-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
30-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
46+
3147
steps:
32-
- name: log github context
33-
env:
34-
GITHUB_CONTEXT: ${{ toJson(github) }}
35-
run: echo "$GITHUB_CONTEXT"
48+
- name: Checkout code
49+
uses: actions/checkout@v4
3650

37-
- name: setup dotnet core
38-
uses: actions/setup-dotnet@v4.0.1
51+
- name: Setup .NET
52+
uses: actions/setup-dotnet@v4
3953
with:
4054
dotnet-version: ${{ env.DOTNET_VERSION }}
55+
cache: true
56+
cache-dependency-path: "**/*.csproj"
4157

42-
- name: get the code
43-
uses: actions/checkout@v4.1.7
44-
45-
- name: clean
46-
run: dotnet clean
47-
--configuration ${{ env.CONFIGURATION }}
48-
--nologo
49-
${{ env.SOLUTION_PATH }}
50-
51-
- name: restore
52-
run: dotnet restore
53-
--runtime ${{ matrix.runtime }}
54-
--nologo
55-
${{ env.SOLUTION_PATH }}
58+
- name: Restore dependencies
59+
run: dotnet restore ${{ env.SOLUTION_PATH }} --runtime ${{ matrix.runtime }}
5660

57-
- name: build
58-
run: dotnet build
61+
- name: Build
62+
run: >-
63+
dotnet build ${{ env.SOLUTION_PATH }}
5964
--configuration ${{ env.CONFIGURATION }}
6065
--runtime ${{ matrix.runtime }}
61-
--self-contained false
66+
--no-restore
6267
--no-incremental
63-
--nologo
6468
/p:WarningLevel=4
6569
/p:TreatWarningsAsErrors=true
66-
/p:NoWarn=""
67-
/p:WarningsAsErrors=""
68-
${{ env.SOLUTION_PATH }}
6970
70-
- name: test
71-
run: dotnet test
71+
- name: Test
72+
run: >-
73+
dotnet test ${{ env.SOLUTION_PATH }}
7274
--configuration ${{ env.CONFIGURATION }}
7375
--runtime ${{ matrix.runtime }}
74-
--no-restore
7576
--no-build
76-
--nologo
77+
--verbosity normal
78+
--logger "trx;LogFileName=test-results.trx"
7779
--filter "Category=unit|Category=integration"
78-
${{ env.SOLUTION_PATH }}
80+
81+
- name: Upload test results
82+
uses: actions/upload-artifact@v4
83+
if: always()
84+
with:
85+
name: test-results-${{ matrix.os }}
86+
path: "**/TestResults/*.trx"
87+
retention-days: 7

0 commit comments

Comments
 (0)