iterate on CI
This commit is contained in:
committed by
pullfrog[bot]
parent
332ef73b87
commit
e4b086938e
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user