From f75c142488b0859ea0e147bffdd135355731fff3 Mon Sep 17 00:00:00 2001 From: Corentin THOMASSET Date: Sat, 31 Aug 2024 22:40:24 +0200 Subject: [PATCH] chore(ci): added workflow for cli package (#68) --- .github/workflows/ci-cli.yaml | 39 +++++++++++++++++++++++ packages/cli/bin/enclosed.mjs | 4 +-- packages/cli/src/config/config.command.ts | 3 +- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci-cli.yaml diff --git a/.github/workflows/ci-cli.yaml b/.github/workflows/ci-cli.yaml new file mode 100644 index 00000000..5734ce38 --- /dev/null +++ b/.github/workflows/ci-cli.yaml @@ -0,0 +1,39 @@ +name: CI - Lib + +on: + pull_request: + push: + branches: + - main + +jobs: + ci-cli: + runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/cli + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: 22 + corepack: true + cache: 'pnpm' + + - name: Install dependencies + run: pnpm i + working-directory: ./ + + - name: Run linters + run: pnpm lint + + # - name: Type check + # run: pnpm typecheck + + # - name: Run unit test + # run: pnpm test + + - name: Build the lib + run: pnpm build diff --git a/packages/cli/bin/enclosed.mjs b/packages/cli/bin/enclosed.mjs index f40a5494..c7e774dd 100755 --- a/packages/cli/bin/enclosed.mjs +++ b/packages/cli/bin/enclosed.mjs @@ -1,4 +1,4 @@ #!/usr/bin/env node -'use strict' +'use strict'; -import '../dist/cli.mjs' \ No newline at end of file +import '../dist/cli.mjs'; diff --git a/packages/cli/src/config/config.command.ts b/packages/cli/src/config/config.command.ts index 70a3b06b..1919f51c 100644 --- a/packages/cli/src/config/config.command.ts +++ b/packages/cli/src/config/config.command.ts @@ -1,6 +1,5 @@ import { defineCommand } from 'citty'; -import picocolors from 'picocolors'; -import { keys, map } from 'lodash-es'; +import { keys } from 'lodash-es'; import { configDefinition } from './config.constants'; import { deleteConfig, getConfig, resetConfig, setConfig } from './config.models';