diff --git a/.github/workflows/api_pull_request.yml b/.github/workflows/api_pull_request.yml index f805848..8bb9a09 100644 --- a/.github/workflows/api_pull_request.yml +++ b/.github/workflows/api_pull_request.yml @@ -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 diff --git a/src/AltGen.API.Tests/Fixtures/TestConfiguration.cs b/src/AltGen.API.Tests/Fixtures/TestConfiguration.cs index a09be22..8994f34 100644 --- a/src/AltGen.API.Tests/Fixtures/TestConfiguration.cs +++ b/src/AltGen.API.Tests/Fixtures/TestConfiguration.cs @@ -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();