Skip to content
Closed
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
52 changes: 40 additions & 12 deletions .github/workflows/itests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,36 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet-version: ['8.0', '9.0', '10.0']
dotnet-version: ['8.0', '9.0', '10.0', '11.0']
include:
- dotnet-version: '8.0'
display-name: '.NET 8.0'
framework: 'net8.0'
prefix: 'net8'
install-version: '8.0.x'
quality: 'ga'
upload_coverage: false
- dotnet-version: '9.0'
display-name: '.NET 9.0'
framework: 'net9.0'
prefix: 'net9'
install-version: '9.0.x'
quality: 'ga'
upload_coverage: false
- dotnet-version: '10.0'
display-name: '.NET 10.0'
framework: 'net10.0'
prefix: 'net10'
install-version: '10.0.x'
quality: 'ga'
upload_coverage: true
- dotnet-version: '11.0'
display-name: '.NET 11.0'
framework: 'net11.0'
prefix: 'net11'
install-version: '11.0.x'
quality: 'preview'
upload_coverage: false
env:
NUPKG_OUTDIR: bin/Release/nugets
GOVER: 1.20.3
Expand All @@ -40,6 +50,7 @@ jobs:
DAPR_RUNTIME_VER: 1.16.6
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/release-1.16/install/install.sh
DAPR_CLI_REF: ''
DaprEnableNet11: ${{ matrix.framework == 'net11.0' }}
steps:
- name: Set up Dapr CLI
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
Expand Down Expand Up @@ -95,11 +106,14 @@ jobs:
- uses: actions/checkout@v1
- name: Parse release version
run: python ./.github/scripts/get_release_version.py
- name: Remove global.json (use .NET 11 preview SDK)
if: ${{ matrix.framework == 'net11.0' }}
run: rm global.json
- name: Setup ${{ matrix.display-name }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.install-version }}
dotnet-quality: 'ga' # Prefer a GA release, but use the RC if not available
dotnet-quality: ${{ matrix.quality }}
- name: Setup .NET 8 (required)
uses: actions/setup-dotnet@v3
if: ${{ matrix.install-version != '8.0.x' }}
Expand Down Expand Up @@ -141,33 +155,47 @@ jobs:
id: tests
continue-on-error: true # proceed if tests fail, the report step will report the failure with more details.
run: |
test_args=(
--logger "trx;LogFilePrefix=${{ matrix.prefix }}"
--logger "console;verbosity=detailed"
)
if [[ "${{ matrix.framework }}" != "net11.0" ]]; then
test_args+=(
--logger "GitHubActions;report-warnings=false"
/p:CollectCoverage=true
/p:CoverletOutputFormat=opencover
)
fi
dotnet test ${{ github.workspace }}/test/Dapr.E2E.Test/Dapr.E2E.Test.csproj \
--configuration Release \
--framework ${{ matrix.framework }} \
--no-build \
--no-restore \
--logger "trx;LogFilePrefix=${{ matrix.prefix }}" \
--logger "GitHubActions;report-warnings=false" \
--logger "console;verbosity=detailed" \
--results-directory "${{ github.workspace }}/TestResults" \
/p:CollectCoverage=true \
/p:CoverletOutputFormat=opencover \
"${test_args[@]}" \
/p:GITHUB_ACTIONS=false
- name: Run Generators Integration Tests
id: generator-tests
continue-on-error: true # proceed if tests fail, the report step will report the failure with more details.
run: |
test_args=(
--logger "trx;LogFilePrefix=${{ matrix.prefix }}"
--logger "console;verbosity=detailed"
)
if [[ "${{ matrix.framework }}" != "net11.0" ]]; then
test_args+=(
--logger "GitHubActions;report-warnings=false"
/p:CollectCoverage=true
/p:CoverletOutputFormat=opencover
)
fi
dotnet test ${{ github.workspace }}/test/Dapr.E2E.Test.Actors.Generators/Dapr.E2E.Test.Actors.Generators.csproj \
--configuration Release \
--framework ${{ matrix.framework }} \
--no-build \
--no-restore \
--logger "trx;LogFilePrefix=${{ matrix.prefix }}" \
--logger "GitHubActions;report-warnings=false" \
--logger "console;verbosity=detailed" \
--results-directory "${{ github.workspace }}/TestResults" \
/p:CollectCoverage=true \
/p:CoverletOutputFormat=opencover \
"${test_args[@]}" \
/p:GITHUB_ACTIONS=false
- name: Check test failure in PR
if: github.event_name == 'pull_request' && (steps.tests.outcome != 'success' || steps.generator-tests.outcome != 'success')
Expand Down
160 changes: 158 additions & 2 deletions .github/workflows/sdk_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,77 @@ jobs:

printf 'matrix=%s\n' "$matrix_json" >> "$GITHUB_OUTPUT"

compute-integration-matrix-net11:
runs-on: ubuntu-latest
permissions:
contents: read
needs: [ discover-integration-v2-tests, get-dapr-versions ]
outputs:
matrix: ${{ steps.build.outputs.matrix }}
steps:
- id: build
shell: bash
run: |
set -euo pipefail

projects_raw='${{ needs.discover-integration-v2-tests.outputs.projects }}'
dapr_raw='${{ needs.get-dapr-versions.outputs.matrix_json }}'

if [ -z "${projects_raw}" ] || [ "${projects_raw}" = "null" ]; then
projects_raw='[]'
fi
if [ -z "${dapr_raw}" ] || [ "${dapr_raw}" = "null" ]; then
dapr_raw='[]'
fi

dotnets='[
{"dotnet-version":"11.0", "display-name":".NET 11.0", "framework":"net11.0", "prefix":"net11", "install-version":"11.0.x"}
]'
oss='["ubuntu-latest"]'

dapr_array=$(
jq -cn --argjson d "$dapr_raw" '
if ($d|type) == "array" then
$d
elif ($d|type) == "object" and ($d|has("include")) then
$d.include
elif ($d|type) == "object" then
[$d]
else
[]
end
'
)

matrix_json=$(
jq -cn \
--argjson projects "$projects_raw" \
--argjson dotnets "$dotnets" \
--argjson oss "$oss" \
--argjson dapr "$dapr_array" '
[
$projects[] as $p
| $dotnets[] as $d
| $oss[] as $o
| $dapr[] as $dv
| {
project: $p.project,
projectName: $p.projectName,
"dotnet-version": $d["dotnet-version"],
"display-name": $d["display-name"],
framework: $d.framework,
prefix: $d.prefix,
"install-version":$d["install-version"],
os: $o,
"dapr-runtime-versions": $dv
}
]
| { include: . }
'
)

printf 'matrix=%s\n' "$matrix_json" >> "$GITHUB_OUTPUT"

integration-tests-v2:
name: ${{ matrix.prefix }}-${{ matrix['dapr-runtime-versions'].version }}-${{ matrix.projectName }}
needs: [ compute-integration-matrix ]
Expand Down Expand Up @@ -264,9 +335,52 @@ jobs:
with:
TRX_PATH: ${{ github.workspace }}/TestResults
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
integration-tests-net11:
name: ${{ matrix.prefix }}-${{ matrix['dapr-runtime-versions'].version }}-${{ matrix.projectName }}
needs: [ compute-integration-matrix-net11 ]
runs-on: ${{ matrix.os }}
permissions:
checks: write
contents: read
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.compute-integration-matrix-net11.outputs.matrix) }}
steps:
- uses: actions/checkout@v6
- name: Remove global.json (use .NET 11 preview SDK)
run: rm global.json
- name: Setup ${{ matrix.display-name }}
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ matrix.install-version }}
dotnet-quality: 'preview'
- name: Integration Tests
id: integration-tests-net11
continue-on-error: false
env:
DAPR_RUNTIME_VERSION: ${{ matrix.dapr-runtime-versions.version }}
DaprEnableNet11: 'true'
run: |
dotnet test "${{ matrix.project }}" \
--configuration release \
--framework ${{ matrix.framework }} \
--logger "trx;LogFilePrefix=${{ matrix.prefix }}" \
--logger "console;verbosity=detailed" \
--results-directory "${{ github.workspace }}/TestResults" \
/p:RuntimeIdentifier=linux-x64 \
/p:GITHUB_ACTIONS=false
timeout-minutes: 60
- name: Parse Trx files
uses: NasAmin/trx-parser@v0.2.0
id: trx-parser
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository # does not work on PRs from forks
with:
TRX_PATH: ${{ github.workspace }}/TestResults
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ci-integration-tests-gate:
runs-on: ubuntu-latest
needs: [integration-tests-v2, integration-test]
needs: [integration-tests-v2, integration-test, integration-tests-net11]
steps:
- name: "All integration tests passed"
run: echo "All unit tests passed"
Expand Down Expand Up @@ -339,9 +453,51 @@ jobs:
with:
TRX_PATH: ${{ github.workspace }}/TestResults
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
unit-tests-net11:
name: Unit Tests .NET 11.0 / ${{ matrix.project }}
needs: discover-unit-test-projects
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
strategy:
fail-fast: false
matrix:
project: ${{ fromJson(needs.discover-unit-test-projects.outputs.matrix) }}
steps:
- uses: actions/checkout@v6
- name: Remove global.json (use .NET 11 preview SDK)
run: rm global.json
- name: Setup .NET 11.0
uses: actions/setup-dotnet@v5
with:
dotnet-version: '11.0.x'
dotnet-quality: 'preview'
- name: Test
env:
DaprEnableNet11: 'true'
id: tests
continue-on-error: false
run: |
dotnet test "${{ matrix.project }}" \
--configuration release \
--framework net11.0 \
--logger "trx;LogFilePrefix=net11" \
--logger "console;verbosity=detailed" \
--results-directory "${{ github.workspace }}/TestResults" \
/p:RuntimeIdentifier=linux-x64 \
/p:GITHUB_ACTIONS=false
timeout-minutes: 60
- name: Parse Trx files
uses: NasAmin/trx-parser@v0.2.0
id: trx-parser
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository # does not work on PRs from forks
with:
TRX_PATH: ${{ github.workspace }}/TestResults
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ci-unit-tests-gate:
runs-on: ubuntu-latest
needs: [unit-tests]
needs: [unit-tests, unit-tests-net11]
steps:
- name: "All unit tests passed"
run: echo "All unit tests passed"
Expand Down
28 changes: 19 additions & 9 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.24" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.13" Condition="'$(TargetFramework)' == 'net9.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" Condition="'$(TargetFramework)' == 'net10.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.24" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.13" Condition="'$(TargetFramework)' == 'net9.0'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="10.0.3" Condition="'$(TargetFramework)' == 'net10.0'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="5.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
Expand All @@ -36,19 +38,27 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.0.0" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="10.6.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.8" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="11.0.0-preview.7.26381.103" Condition="'$(TargetFramework)' == 'net11.0'" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.8" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.303" />
<PackageVersion Include="Microsoft.Testing.Platform" Version="2.1.0" />
<PackageVersion Include="Microsoft.Testing.Platform" Version="2.1.0" Condition="'$(TargetFramework)' != 'net11.0'" />
<PackageVersion Include="MinVer" Version="7.0.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.2.2" />
Expand Down
1 change: 1 addition & 0 deletions examples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks Condition="'$(DaprEnableNet11)' == 'true'">$(TargetFrameworks);net11.0</TargetFrameworks>
<!-- Set Output Path for samples-->
<OutputPath>$(RepoRoot)bin\$(Configuration)\examples\$(MSBuildProjectName)\</OutputPath>

Expand Down
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks Condition="'$(DaprEnableNet11)' == 'true'">$(TargetFrameworks);net11.0</TargetFrameworks>
<OutputPath>$(RepoRoot)bin\$(Configuration)\prod\$(MSBuildProjectName)\</OutputPath>
<DefaultItemExcludes>$(DefaultItemExcludes);**\obj\**;**\bin\**</DefaultItemExcludes>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public class TimerCallbackMethodPresentAnalyzerTests
private static readonly ReferenceAssemblies assemblies = ReferenceAssemblies.Net.Net90;
#elif NET10_0
private static readonly ReferenceAssemblies assemblies = ReferenceAssemblies.Net.Net100;
#elif NET11_0
private static readonly ReferenceAssemblies assemblies = new ReferenceAssemblies(
"net11.0",
new PackageIdentity("Microsoft.NETCore.App.Ref", "11.0.0-preview.7.26381.103"),
Path.Combine("ref", "net11.0"));
#endif

[Fact]
Expand Down Expand Up @@ -146,4 +151,3 @@ public async Task DoSomethingAsync()




Loading
Loading