Skip to content

chore: Set package ecosystem to 'nuget' in dependabot config #39

chore: Set package ecosystem to 'nuget' in dependabot config

chore: Set package ecosystem to 'nuget' in dependabot config #39

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --configuration Release --no-restore
- name: Start Docker Compose services and wait for health
run: docker compose up -d --wait
working-directory: ./tests
- name: Run tests
run: dotnet test --configuration Release --no-build --verbosity normal --blame-hang-timeout 150s -d run.log --logger "trx;LogFileName=test-results.trx"
timeout-minutes: 10
- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: Test Results
path: '**/*.trx'
reporter: dotnet-trx
fail-on-error: true
- name: Upload test artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
**/*.trx
**/TestResults/**/*.dmp
**/TestResults/**/*.xml
retention-days: 7
- name: Stop Docker Compose services
if: always()
run: docker compose down
working-directory: ./tests