iterate on CI
This commit is contained in:
committed by
pullfrog[bot]
parent
332ef73b87
commit
e4b086938e
@@ -13,6 +13,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
|
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
|
||||||
|
|||||||
@@ -31,8 +31,16 @@ export function setupTestRepo(options: SetupOptions): void {
|
|||||||
const repo = process.env.GITHUB_REPOSITORY;
|
const repo = process.env.GITHUB_REPOSITORY;
|
||||||
if (!repo) throw new Error("GITHUB_REPOSITORY is required");
|
if (!repo) throw new Error("GITHUB_REPOSITORY is required");
|
||||||
log.info(`» cloning ${repo} into ${tempDir}...`);
|
log.info(`» cloning ${repo} into ${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]);
|
$("git", ["clone", `git@github.com:${repo}.git`, tempDir]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface SetupGitParams {
|
interface SetupGitParams {
|
||||||
token: string;
|
token: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user