Skip to content

Commit 459bead

Browse files
Add openrouter base URL and dummy api key vars in test course defn
1 parent 0fb5bb3 commit 459bead

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/test-course-definition.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ jobs:
157157
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158158
# Figure out a way to allow course-specific environment variables
159159
CODECRAFTERS_SECRET_OPENROUTER_API_KEY: ${{ secrets.CODECRAFTERS_SECRET_OPENROUTER_API_KEY }}
160+
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
161+
OPENROUTER_BASE_URL: ${{ secrets.OPENROUTER_BASE_URL }}
160162

161163
validate-schemas:
162164
runs-on: ubuntu-latest

lib/testers/base-tester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default class BaseTester {
113113
protected getCodecraftersSecretEnvFlags(): string[] {
114114
const flags: string[] = [];
115115
for (const [key, value] of Object.entries(process.env)) {
116-
if (key.startsWith("CODECRAFTERS_SECRET_") && value !== undefined) {
116+
if ((key.startsWith("CODECRAFTERS_SECRET_") || key.startsWith("OPENROUTER")) && value !== undefined) {
117117
// Escape single quotes in the value by replacing ' with '\''
118118
const escapedValue = value.replace(/'/g, "'\\''");
119119
flags.push(`-e ${key}='${escapedValue}'`);

0 commit comments

Comments
 (0)