deps: Bump FluentAssertions, MSTest.TestAdapter and MSTest.TestFramework #36
Workflow file for this run
This file contains hidden or 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: Lint Build, Test and Publish .NET Apps | |
on: | |
workflow_call: | |
inputs: | |
build_configuration: | |
description: 'Build configuration (Debug/Release)' | |
type: string | |
default: 'Debug' | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
dotnet-lint-build-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: | |
- GenAIDBExplorer.Console | |
- GenAIDBExplorer.Core | |
name: Lint, Build, and Test ${{ matrix.project }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Restore dependencies | |
run: dotnet restore src/GenAIDBExplorer/GenAIDBExplorer.sln | |
- name: Lint with dotnet format | |
run: dotnet format src/GenAIDBExplorer/${{ matrix.project }} --verify-no-changes --severity error | |
- name: Build | |
run: dotnet build src/GenAIDBExplorer/${{ matrix.project }} --configuration ${{ inputs.build_configuration }} --no-restore | |
- name: Run tests | |
run: | | |
if [ -d "src/GenAIDBExplorer/Tests/Unit/${{ matrix.project }}.Test" ]; then | |
dotnet test src/GenAIDBExplorer/Tests/Unit/${{ matrix.project }}.Test --configuration ${{ inputs.build_configuration }} --no-restore --logger trx | |
else | |
echo "No tests found for ${{ matrix.project }}" | |
fi | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.project }}-test-results | |
path: '**/TestResults/*.trx' |