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
|
- name: Build project
|
||||||
run: dotnet build ./AltGen.API.Tests/AltGen.API.Tests.csproj --no-restore
|
run: dotnet build ./AltGen.API.Tests/AltGen.API.Tests.csproj --no-restore
|
||||||
- name: Test project
|
- name: Test project
|
||||||
|
env:
|
||||||
|
Gemini__ApiKey: ${{ secrets.GEMINI_APIKEY }}
|
||||||
run: dotnet test ./AltGen.API.Tests/AltGen.API.Tests.csproj --filter FullyQualifiedName!~PromptEvaluation
|
run: dotnet test ./AltGen.API.Tests/AltGen.API.Tests.csproj --filter FullyQualifiedName!~PromptEvaluation
|
||||||
- name: Upload test coverage report
|
- name: Upload test coverage report
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace AltGen.API.Tests.Fixtures;
|
|||||||
public class TestConfiguration
|
public class TestConfiguration
|
||||||
{
|
{
|
||||||
static IConfiguration Config { get; } = new ConfigurationBuilder()
|
static IConfiguration Config { get; } = new ConfigurationBuilder()
|
||||||
.AddJsonFile("appsettings.Test.json")
|
.AddJsonFile("appsettings.Test.json", optional: true)
|
||||||
.AddEnvironmentVariables()
|
.AddEnvironmentVariables()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user