Skip to content

Update dotnet-ci.yml #4

Update dotnet-ci.yml

Update dotnet-ci.yml #4

Workflow file for this run

name: CI
on:
push:
branches: [ "main", "pipeline" ]
pull_request:
branches: [ "main" ]
env:
BuildConfiguration: 'Release'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration ${{env.BuildConfiguration}}
- name: Test
env:
AzureOpenAI__ChatDeploymentName: ${{ secrets.IntegrationTest__AzureOpenAI__ChatDeploymentName }}
AzureOpenAI__TextEmbeddingsDeploymentName: ${{ secrets.IntegrationTest__AzureOpenAI__TextEmbeddingsDeploymentName }}
AzureOpenAI__Endpoint: ${{ secrets.IntegrationTest__AzureOpenAI__Endpoint }}
AzureOpenAI__ApiKey: ${{ secrets.IntegrationTest__AzureOpenAI__ApiKey }}
run: dotnet test --no-build --collect:"XPlat Code Coverage" --results-directory ./coverage --verbosity normal --configuration ${{env.BuildConfiguration}}
- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
- name: Write Coverage Report to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md