From 3eacbf8da50efb8cbcdaa5af76068b6a9decd507 Mon Sep 17 00:00:00 2001 From: Jarrod Overson Date: Tue, 24 Jan 2023 09:38:16 -0500 Subject: [PATCH] added deploy key and ssh key secret for tests --- .github/workflows/test.yml | 11 +++++++++++ apex.yaml | 2 +- src/commands/init.ts | 1 - src/commands/new.ts | 1 - test/run-apex.ts | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d785add..53d23ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,5 +13,16 @@ jobs: steps: - uses: actions/checkout@v2 - uses: denolib/setup-deno@v2 + - name: Add SSH key + env: + TEST_SSH_KEY: ${{ secrets.TEST_SSH_KEY }} + run: | + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + echo "$TEST_SSH_KEY" > ~/.ssh/github_actions.key + chmod 600 ~/.ssh/github_actions.key + ls -alF ~/.ssh - name: Run tests + env: + GIT_SSH_COMMAND: ssh -i ~/.ssh/github_actions.key run: ./apex test diff --git a/apex.yaml b/apex.yaml index 8eb41b8..debbbd2 100644 --- a/apex.yaml +++ b/apex.yaml @@ -3,7 +3,7 @@ tasks: description: Run tests cmds: - deno fmt --check src/ test/ - - deno test --unstable -A + - deno test --unstable -A test/raw-commands.test.ts install: description: Install apex cmds: diff --git a/src/commands/init.ts b/src/commands/init.ts index 95db91e..71add81 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -19,7 +19,6 @@ export const command = new Command() .option( "-b, --branch ", "checkout branch before processing template", - { default: "main" }, ) .option( "-s, --spec ", diff --git a/src/commands/new.ts b/src/commands/new.ts index eddb6cc..6ec14f5 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -19,7 +19,6 @@ export const command = new Command() .option( "-b, --branch ", "checkout branch before processing template", - { default: "main" }, ) .option( "-s, --spec ", diff --git a/test/run-apex.ts b/test/run-apex.ts index dbcfce3..e56baec 100644 --- a/test/run-apex.ts +++ b/test/run-apex.ts @@ -10,6 +10,7 @@ export async function runApex( "./apex.ts", ]; cmd.push(...args); + console.log(`Running: ${cmd.join(" ")}`); const proc = Deno.run({ env, stderr: "inherit",