Skip to content

Commit 6e943de

Browse files
committed
Initial import from private SDK repository
Complete .NET SDK for Restate durable execution engine: - 4 src projects (Restate.Sdk, Generators, Testing, Lambda) - 3 test projects (262 tests, benchmarks) - 4 samples (Greeter, Counter, TicketReservation, SignupWorkflow) - CI/CD workflows, proto definitions, Docker Compose Verified end-to-end against Restate 1.6.0.
0 parents  commit 6e943de

File tree

164 files changed

+16304
-0
lines changed

Some content is hidden

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

164 files changed

+16304
-0
lines changed

.editorconfig

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
root = true
2+
3+
[*.cs]
4+
# CA1716: Identifiers should not match keywords — Get/Set/Call are intentional Restate API names
5+
dotnet_diagnostic.CA1716.severity = none
6+
7+
# CA1000: Do not declare static members on generic types — StateKey<T>.Of() is idiomatic
8+
dotnet_diagnostic.CA1000.severity = none
9+
10+
# CA5394: Random is insecure — RestateRand uses deterministic seeded Random for replay safety, not security
11+
dotnet_diagnostic.CA5394.severity = none
12+
13+
# CA1815: Override Equals on value types — Awakeable<T> is not used for equality comparison
14+
dotnet_diagnostic.CA1815.severity = none
15+
16+
# CA1032: Implement standard exception constructors — TerminalException intentionally requires a message
17+
dotnet_diagnostic.CA1032.severity = none
18+
19+
# CA1064: Exceptions should be public — ProtocolException is intentionally internal
20+
dotnet_diagnostic.CA1064.severity = none
21+
22+
# CA2012: Use ValueTasks correctly — false positive on Awakeable creation pattern
23+
dotnet_diagnostic.CA2012.severity = suggestion
24+
25+
# CA1859: Use concrete types for improved performance — intentional polymorphism in context factory
26+
dotnet_diagnostic.CA1859.severity = suggestion
27+
28+
# CA1822: Member can be static — Restate handler methods are instance methods invoked by the framework
29+
dotnet_diagnostic.CA1822.severity = suggestion
30+
31+
# CA1816: Call GC.SuppressFinalize — not needed for test disposables
32+
dotnet_diagnostic.CA1816.severity = suggestion
33+
34+
# CA1852: Type can be sealed — suggestion level for test/internal types
35+
dotnet_diagnostic.CA1852.severity = suggestion
36+
37+
# CA1869: Cache JsonSerializerOptions — suggestion level, fine in tests
38+
dotnet_diagnostic.CA1869.severity = suggestion

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
name: Build & Test
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: '10.0.x'
24+
dotnet-quality: 'preview'
25+
26+
- name: Restore
27+
run: dotnet restore
28+
29+
- name: Build
30+
run: dotnet build --no-restore -c Release
31+
32+
- name: Test
33+
run: dotnet test --no-build -c Release --logger "trx;LogFileName=results.trx"
34+
35+
- name: Upload test results
36+
uses: actions/upload-artifact@v4
37+
if: always()
38+
with:
39+
name: test-results
40+
path: '**/results.trx'
41+
42+
format:
43+
name: Format Check
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Setup .NET
50+
uses: actions/setup-dotnet@v4
51+
with:
52+
dotnet-version: '10.0.x'
53+
dotnet-quality: 'preview'
54+
55+
- name: Check formatting
56+
run: dotnet format --verify-no-changes --verbosity diagnostic

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish:
13+
name: Pack & Push to NuGet
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: '10.0.x'
23+
dotnet-quality: 'preview'
24+
25+
- name: Restore
26+
run: dotnet restore
27+
28+
- name: Build
29+
run: dotnet build --no-restore -c Release
30+
31+
- name: Test
32+
run: dotnet test --no-build -c Release
33+
34+
- name: Pack
35+
run: dotnet pack --no-build -c Release -o ./artifacts
36+
37+
- name: Push to NuGet.org
38+
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
39+
40+
- name: Push symbols to NuGet.org
41+
run: dotnet nuget push ./artifacts/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
42+
continue-on-error: true
43+
44+
- name: Upload artifacts
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: nuget-packages
48+
path: ./artifacts/*

0 commit comments

Comments
 (0)