Skip to content

deps: Bump the nuget-minor group with 10 updates #264

deps: Bump the nuget-minor group with 10 updates

deps: Bump the nuget-minor group with 10 updates #264

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
DOTNET_SDK_VERSION: "10.0.x"
jobs:
# Build job - runs first, creates build artifacts for test jobs
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/Directory.*.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore Encina.slnx
- name: Build
run: dotnet build Encina.slnx --configuration Release --no-restore
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: |
**/bin/Release/**
**/obj/**/*.assets.json
retention-days: 1
# Test jobs - run in parallel after build
test-core:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Core tests
run: |
dotnet test tests/Encina.Tests/Encina.Tests.csproj --no-build -c Release || true
dotnet test tests/Encina.ContractTests/Encina.ContractTests.csproj --no-build -c Release || true
dotnet test tests/Encina.PropertyTests/Encina.PropertyTests.csproj --no-build -c Release || true
dotnet test tests/Encina.DomainModeling.Tests/Encina.DomainModeling.Tests.csproj --no-build -c Release || true
dotnet test tests/Encina.DomainModeling.ContractTests/Encina.DomainModeling.ContractTests.csproj --no-build -c Release || true
dotnet test tests/Encina.DomainModeling.PropertyTests/Encina.DomainModeling.PropertyTests.csproj --no-build -c Release || true
dotnet test tests/Encina.DomainModeling.GuardTests/Encina.DomainModeling.GuardTests.csproj --no-build -c Release || true
test-messaging:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Messaging tests
run: |
for proj in tests/Encina.Messaging.*/Encina.Messaging.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-database-ado:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run ADO tests
run: |
for proj in tests/Encina.ADO.*/Encina.ADO.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-database-dapper:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Dapper tests
run: |
for proj in tests/Encina.Dapper.*/Encina.Dapper.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
dotnet test tests/Encina.Dapper.Tests/Encina.Dapper.Tests.csproj --no-build -c Release || true
test-database-ef:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Entity Framework tests
run: |
for proj in tests/Encina.EntityFrameworkCore.*/Encina.EntityFrameworkCore.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-caching:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Caching tests
run: |
for proj in tests/Encina.Caching.*/Encina.Caching.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-validation:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Validation tests
run: |
for proj in tests/Encina.DataAnnotations.*/Encina.DataAnnotations.*.csproj \
tests/Encina.FluentValidation.*/Encina.FluentValidation.*.csproj \
tests/Encina.MiniValidator.*/Encina.MiniValidator.*.csproj \
tests/Encina.GuardClauses.*/Encina.GuardClauses.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-aspnetcore:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run AspNetCore tests
run: |
for proj in tests/Encina.AspNetCore.*/Encina.AspNetCore.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-serverless:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Serverless tests
run: |
for proj in tests/Encina.AwsLambda.*/Encina.AwsLambda.*.csproj \
tests/Encina.AzureFunctions.*/Encina.AzureFunctions.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-transports:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Transport tests
run: |
for proj in tests/Encina.RabbitMQ.Tests/Encina.RabbitMQ.Tests.csproj \
tests/Encina.Kafka.Tests/Encina.Kafka.Tests.csproj \
tests/Encina.AmazonSQS.Tests/Encina.AmazonSQS.Tests.csproj \
tests/Encina.NATS.Tests/Encina.NATS.Tests.csproj \
tests/Encina.MQTT.Tests/Encina.MQTT.Tests.csproj \
tests/Encina.AzureServiceBus.Tests/Encina.AzureServiceBus.Tests.csproj \
tests/Encina.SignalR.Tests/Encina.SignalR.Tests.csproj \
tests/Encina.gRPC.Tests/Encina.gRPC.Tests.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-resilience:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Resilience tests
run: |
for proj in tests/Encina.Polly.*/Encina.Polly.*.csproj \
tests/Encina.Extensions.Resilience.*/Encina.Extensions.Resilience.*.csproj \
tests/Encina.DistributedLock.*/Encina.DistributedLock.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-scheduling:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Scheduling tests
run: |
for proj in tests/Encina.Hangfire.*/Encina.Hangfire.*.csproj \
tests/Encina.Quartz.*/Encina.Quartz.*.csproj \
tests/Encina.Workflows.Tests/Encina.Workflows.Tests.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
test-other:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/download-artifact@v4
with:
name: build-output
- name: Run Other tests
run: |
for proj in tests/Encina.Cli.*/Encina.Cli.*.csproj \
tests/Encina.Marten.Tests/Encina.Marten.Tests.csproj \
tests/Encina.MongoDB.Tests/Encina.MongoDB.Tests.csproj \
tests/Encina.OpenTelemetry.*/Encina.OpenTelemetry.*.csproj \
tests/Encina.Refit.*/Encina.Refit.*.csproj \
tests/Encina.Aspire.*/Encina.Aspire.*.csproj; do
[ -f "$proj" ] && dotnet test "$proj" --no-build -c Release || true
done
# Pack and publish - runs after all tests
pack:
needs:
- test-core
- test-messaging
- test-database-ado
- test-database-dapper
- test-database-ef
- test-caching
- test-validation
- test-aspnetcore
- test-serverless
- test-transports
- test-resilience
- test-scheduling
- test-other
runs-on: ubuntu-latest
if: always() && needs.build.result == 'success'
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/Directory.*.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Pack
run: dotnet pack src/Encina/Encina.csproj --configuration Release --output artifacts
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: encina-nuget
path: artifacts/*.nupkg
- name: Publish to GitHub Packages
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_PACKAGES_SOURCE: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }}
run: |
dotnet nuget push artifacts/*.nupkg \
--source "$GITHUB_PACKAGES_SOURCE" \
--api-key "$NUGET_API_KEY" \
--skip-duplicate