Skip to content

Implement .NET Aspire orchestration in Chapter 4 #253

Implement .NET Aspire orchestration in Chapter 4

Implement .NET Aspire orchestration in Chapter 4 #253

name: Chapter 4 Contracts
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/**"
pull_request:
branches: ["main"]
paths:
- "Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src/**"
env:
CHAPTER_DIR: "Chapter-4-applying-tactical-domain-driven-design/Fitnet.Contracts/Src"
NUGET_SOURCE_NAME: "EvolutionaryArchitecture"
jobs:
build:
defaults:
run:
working-directory: ${{ env.CHAPTER_DIR }}
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
- name: Authenticate to GitHub Packages
run: |
dotnet nuget update source ${{ env.NUGET_SOURCE_NAME }} \
--username ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--configfile nuget.config
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
test:
defaults:
run:
working-directory: ${{ env.CHAPTER_DIR }}
runs-on: ubuntu-latest
name: Test
needs: build
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
- name: Authenticate to GitHub Packages
run: |
dotnet nuget update source ${{ env.NUGET_SOURCE_NAME }} \
--username ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--configfile nuget.config
- name: Restore dependencies
run: dotnet restore
- name: Test
run: dotnet test