From 13ea3467818582b1bcd017dc1abfa2b680a217ff Mon Sep 17 00:00:00 2001 From: "Angel M. Adames" Date: Wed, 14 Feb 2024 17:22:48 -0400 Subject: [PATCH] chore: Add test suit on CI --- .github/workflows/tests.yml | 3 +++ src/utils/git.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 484bc99..2c76831 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,3 +35,6 @@ jobs: bun run format:ci bun run lint:ci bun run check:ci + + - name: 🧪 Run tests + run: bun run test diff --git a/src/utils/git.ts b/src/utils/git.ts index ac5c4e1..d6750b3 100644 --- a/src/utils/git.ts +++ b/src/utils/git.ts @@ -50,13 +50,13 @@ export default class Git { ); } - remoteRepoExists(repo: string = this.repoUrl) { + remoteRepoExists(repo: string = this.repoUrl, verbose = false) { const proc = Bun.spawnSync(['git', 'ls-remote', repo], { stdin: 'inherit', }); if (proc.exitCode === 0) { - log.info(`Remote repo: ${repo} is valid.`); + if (verbose) log.info(`Remote repo: ${repo} is valid.`); } else { throw new Error(`Remote repo: ${repo} is not valid or does not exist.`); }