Patching the CodeQL lack of .NET 3.x and 5.x runtime to build out sol… #872
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
name: Build Core Framework | |
on: [push] | |
env: | |
nuGetVersionNumber: 4.5.1 | |
nuGetFullVersionNumber: 4.5.1.${{ github.run_number }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
# dotnet-version: [ '3.1.x', '5.0.x', '6.0.x', '7.0.x' ] | |
dotnet-version: [ '7.0.x' ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup dotnet CLI | |
uses: actions/setup-dotnet@v3.2.0 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
6.0.x | |
7.0.x | |
- name: Setup dependencies caching | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Prepare Legacy NuGet | |
run: | | |
cd .\.nuget | |
ren NuGet.ex_ NuGet.exe | |
cd .. | |
.nuget\NuGet.exe restore Cqrs.sln | |
- name: Build Framework with dotnet CLI | |
run: dotnet build --configuration Release .\Cqrs.sln | |
- name: Test with dotnet (.NET 4.7.2) | |
run: dotnet test -f net472 --logger trx --collect "Code Coverage" --results-directory "TestResults-${{ matrix.dotnet-version }}" Framework\Ninject\Azure\Tests\Cqrs.Ninject.Azure.WebJobs.Tests.Integration\Cqrs.Ninject.Azure.WebJobs.Tests.Integration.csproj | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Test with dotnet (.NET Core 3.1) | |
run: dotnet test -f netcoreapp3.1 --logger trx --collect "Code Coverage" --results-directory "TestResults-${{ matrix.dotnet-version }}" Framework\Ninject\Azure\Tests\Cqrs.Ninject.Azure.WebJobs.Tests.Integration\Cqrs.Ninject.Azure.WebJobs.Tests.Integration.csproj | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Test with dotnet (.NET Core 5.0) | |
run: dotnet test -f net5.0 --logger trx --collect "Code Coverage" --results-directory "TestResults-${{ matrix.dotnet-version }}" Framework\Ninject\Azure\Tests\Cqrs.Ninject.Azure.WebJobs.Tests.Integration\Cqrs.Ninject.Azure.WebJobs.Tests.Integration.csproj | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Test with dotnet (.NET Core 6.0) | |
run: dotnet test -f net6.0 --logger trx --collect "Code Coverage" --results-directory "TestResults-${{ matrix.dotnet-version }}" Framework\Ninject\Azure\Tests\Cqrs.Ninject.Azure.WebJobs.Tests.Integration\Cqrs.Ninject.Azure.WebJobs.Tests.Integration.csproj | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Test with dotnet (.NET Core 7.0) | |
run: dotnet test -f net7.0 --logger trx --collect "Code Coverage" --results-directory "TestResults-${{ matrix.dotnet-version }}" Framework\Ninject\Azure\Tests\Cqrs.Ninject.Azure.WebJobs.Tests.Integration\Cqrs.Ninject.Azure.WebJobs.Tests.Integration.csproj | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dotnet-results-${{ matrix.dotnet-version }} | |
path: TestResults-${{ matrix.dotnet-version }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Pack with dotnet CLI | |
run: | | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Cqrs\Cqrs.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Azure\Cqrs.Azure.ConfigurationManager\Cqrs.Azure.ConfigurationManager.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Azure\Cqrs.Azure.ServiceBus\Cqrs.Azure.ServiceBus.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Azure\Cqrs.Azure.EventHub\Cqrs.Azure.EventHub.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Azure\Cqrs.Azure.WebJobs\Cqrs.Azure.WebJobs.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Cqrs.Web.Mvc\Cqrs.Web.Mvc.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Cqrs.WebApi\Cqrs.WebApi.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Azure\Cqrs.Ninject.Azure.EventHub.CommandBus\Cqrs.Ninject.Azure.EventHub.CommandBus.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Azure\Cqrs.Ninject.Azure.EventHub.EventBus\Cqrs.Ninject.Azure.EventHub.EventBus.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Azure\Cqrs.Ninject.Azure.ServiceBus.CommandBus\Cqrs.Ninject.Azure.ServiceBus.CommandBus.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Azure\Cqrs.Ninject.Azure.ServiceBus.EventBus\Cqrs.Ninject.Azure.ServiceBus.EventBus.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Azure\Cqrs.Ninject.Azure.Wcf\Cqrs.Ninject.Azure.Wcf.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Azure\Cqrs.Ninject.Azure.WebJobs\Cqrs.Ninject.Azure.WebJobs.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Cqrs.Ninject\Cqrs.Ninject.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Cqrs.Ninject.ServiceHost\Cqrs.Ninject.ServiceHost.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Ninject\Cqrs.Ninject.WebApi\Cqrs.Ninject.WebApi.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Framework\Azure\EnterpriseLibrary.Azure.TransientFaultHandling.ServiceBus.NetCore\_EnterpriseLibrary.Azure.TransientFaultHandling.ServiceBus.NetCore.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Scheduler\Cqrs.Scheduler.Commands\Cqrs.Scheduler.Commands.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged | |
dotnet pack -c Release -p:Version=${{ env.nuGetVersionNumber }} Scheduler\Cqrs.Scheduler.Events\Cqrs.Scheduler.Events.csproj -p:PackageVersion=${{ env.nuGetFullVersionNumber}} --version-suffix beta-$(date +%Y%m%d%H%M%S) --include-symbols -p:SymbolPackageFormat=snupkg --include-source -o Packaged |