Skip to content

fixed csproj changes #963

fixed csproj changes

fixed csproj changes #963

#
# This workflow will build/test/lint the .NET SDK.
#
name: DOTNET Build/Test/Lint
on:
workflow_call:
workflow_dispatch:
push:
branches: ['**']
paths: ['.github/workflows/dotnet-*.yml', 'dotnet/**']
permissions: read-all
jobs:
build-test-lint:
name: Build/Test/Lint
runs-on: windows-latest
strategy:
matrix:
dotnet-version: ['6.0', '7.0']
fail-fast: false
defaults:
run:
shell: bash
working-directory: dotnet/packages/Microsoft.TeamsAI/
env:
SOLUTION_DIR: dotnet/packages/Microsoft.TeamsAI/
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore
run: dotnet restore Microsoft.Teams.AI.sln
- name: Build
run: dotnet build Microsoft.Teams.AI.sln --no-restore --configuration Release
- name: Test
run: dotnet test Microsoft.TeamsAI.Tests/Microsoft.Teams.AI.Tests.csproj --no-restore --verbosity normal --logger trx --results-directory ./TestResults --collect:"XPlat Code Coverage" --configuration Release
- name: Coverage
uses: danielpalme/ReportGenerator-GitHub-Action@345a7c3866622fe946263314218ad2c12c388b8b # 5.3.7
with:
reports: ${{ env.SOLUTION_DIR }}TestResults/*/coverage.cobertura.xml
targetdir: ${{ env.SOLUTION_DIR }}TestResults/coverage
reporttypes: 'HtmlInline;lcov'
toolpath: ${{ env.SOLUTION_DIR }}report-generator-tool
- name: Upload Tests
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testresults-dotnet-${{ matrix.dotnet-version }}
path: ${{ env.SOLUTION_DIR }}TestResults
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit