Skip to content

Add instrumentation for simple convenience chat calls #229

Add instrumentation for simple convenience chat calls

Add instrumentation for simple convenience chat calls #229

Workflow file for this run

name: Build and Test
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
jobs:
build: # Test, pack and publish the Open AI nuget package as a build artifact
runs-on: ubuntu-latest
env:
version_suffix_args: ${{ format('--version-suffix="alpha.{0}"', github.run_number) }}
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.x
- name: Checkout code
uses: actions/checkout@v2
- name: Build and Pack
run: dotnet pack
--configuration Release
--output "${{github.workspace}}/artifacts/packages"
${{ env.version_suffix_args }}
- name: Test
run: dotnet test
--configuration Release
--filter="TestCategory~${{ github.event_name == 'pull_request' && 'Offline' || 'Online' }}"
--logger "trx;LogFileName=${{github.workspace}}/artifacts/test-results/full.trx"
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: ${{github.workspace}}/artifacts
- name: NuGet Autenticate
if: github.event_name != 'pull_request'
run: dotnet nuget add source
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
--name "github"
--username ${{ github.actor }}
--password ${{ secrets.GITHUB_TOKEN }}
--store-password-in-clear-text
- name: Publish
if: github.event_name != 'pull_request'
run: dotnet nuget push
${{github.workspace}}/artifacts/packages/*.nupkg
--source "github"
--api-key ${{ secrets.GITHUB_TOKEN }}
--skip-duplicate