Skip to content

Commit b76a503

Browse files
committed
skip llm tests on forks
1 parent 8d3b810 commit b76a503

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/pr_checks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ jobs:
285285
cd core
286286
npm test
287287
env:
288+
IGNORE_API_KEY_TESTS: ${{ github.event.pull_request.head.repo.fork }}
288289
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
289290
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
290291
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}

core/llm/llm.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ function testLLM(
178178
}
179179

180180
describe("LLM", () => {
181+
if (process.env.IGNORE_API_KEY_TESTS === "true") {
182+
test("Skipping API key tests", () => {
183+
console.log(
184+
"Skipping API key tests due to IGNORE_API_KEY_TESTS being set",
185+
);
186+
});
187+
return;
188+
}
189+
181190
testLLM(
182191
new Anthropic({
183192
model: "claude-3-5-sonnet-latest",

0 commit comments

Comments
 (0)