fix: add gemini key as env var in workflow and make config file optional
This commit is contained in:
@@ -56,6 +56,8 @@ jobs:
|
||||
- name: Build project
|
||||
run: dotnet build ./AltGen.API.Tests/AltGen.API.Tests.csproj --no-restore
|
||||
- name: Test project
|
||||
env:
|
||||
Gemini__ApiKey: ${{ secrets.GEMINI_APIKEY }}
|
||||
run: dotnet test ./AltGen.API.Tests/AltGen.API.Tests.csproj --filter FullyQualifiedName!~PromptEvaluation
|
||||
- name: Upload test coverage report
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace AltGen.API.Tests.Fixtures;
|
||||
public class TestConfiguration
|
||||
{
|
||||
static IConfiguration Config { get; } = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.Test.json")
|
||||
.AddJsonFile("appsettings.Test.json", optional: true)
|
||||
.AddEnvironmentVariables()
|
||||
.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user