Merge branch 'main' of https://github.com/tomlm/Linq.AI.OpenAI #23
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: BuildAndRunTests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- source/** | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- source/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Linq.AI | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore source/Linq.AI.sln | |
- name: Build | |
run: dotnet build --no-restore source/Linq.AI.sln --property WarningLevel=0 | |
- name: Test | |
run: | | |
dotnet user-secrets set OpenAIKey '${{ secrets.OPENAIKEY }}' -p source/Linq.AI.OpenAI.Tests/Linq.AI.OpenAI.Tests.csproj | |
dotnet test --no-build --verbosity normal source/Linq.AI.OpenAI.sln |