iterate on CI

This commit is contained in:
David Blass
2026-01-16 15:52:37 +00:00
committed by pullfrog[bot]
parent 332ef73b87
commit e4b086938e
2 changed files with 10 additions and 1 deletions
+1
View File
@@ -13,6 +13,7 @@ jobs:
test:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
+9 -1
View File
@@ -31,7 +31,15 @@ export function setupTestRepo(options: SetupOptions): void {
const repo = process.env.GITHUB_REPOSITORY;
if (!repo) throw new Error("GITHUB_REPOSITORY is required");
log.info(`» cloning ${repo} into ${tempDir}...`);
$("git", ["clone", `git@github.com:${repo}.git`, tempDir]);
// use HTTPS with token in CI, SSH locally
if (process.env.CI) {
const token = process.env.GITHUB_TOKEN;
if (!token) throw new Error("GITHUB_TOKEN is required in CI");
$("git", ["clone", `https://x-access-token:${token}@github.com/${repo}.git`, tempDir]);
} else {
$("git", ["clone", `git@github.com:${repo}.git`, tempDir]);
}
}
interface SetupGitParams {