openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
OpenAI_2.2.0-beta.2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/main.yml

47lines · modecode

1# This worflow is triggered on push to main, pull request, or by manual invocation.
2# It builds and unit tests the codebase.
3name: Build and Unit Test
4
5on:
6 workflow_dispatch:
7 push:
8 branches:
9 - main
10 pull_request:
11 types: [opened, reopened, synchronize]
12
13jobs:
14 build: # Test, pack and publish the Open AI nuget package as a build artifact
15 name: Build
16 runs-on: ubuntu-latest
17 env:
18 version_suffix_args: ${{ format('/p:VersionSuffix="alpha.{0}"', github.run_number) }}
19 steps:
20 - name: Setup .NET
21 uses: actions/setup-dotnet@v3
22 with:
23 dotnet-version: '8.x'
24
25 - name: Checkout code
26 uses: actions/checkout@v2
27
28 - name: Build and pack
29 run: dotnet pack
30 --configuration Release
31 --output "${{github.workspace}}/artifacts/packages"
32 ${{ env.version_suffix_args}}
33
34 - name: Run unit tests
35 run: dotnet test
36 --configuration Release
37 --filter="TestCategory=Smoke&TestCategory!=Manual"
38 --logger "trx;LogFilePrefix=smoke"
39 --results-directory ${{github.workspace}}/artifacts/test-results
40 ${{ env.version_suffix_args}}
41
42 - name: Upload artifact
43 uses: actions/upload-artifact@v4
44 if: ${{ !cancelled() }}
45 with:
46 name: build-artifacts
47 path: ${{github.workspace}}/artifacts
48