chore: update CLI to use npm package for Common, adjust TypeScript config, and add CI workflow

- Changed dependency for Common in CLI package.json to use npm package @oneuptime/common@latest.
- Updated tsconfig.json to exclude Tests, build, node_modules, and jest.config.json.
- Modified PublishAllPackages.sh to replace Common dependency with the pinned version during publish.
- Added GitHub Actions workflow for testing CLI on pull requests and pushes.
This commit is contained in:
Nawaz Dhandala
2026-02-15 12:05:35 +00:00
parent d25a97fe17
commit 1f634576fe
6 changed files with 13168 additions and 352 deletions

View File

@@ -420,4 +420,21 @@ jobs:
with:
timeout_minutes: 30
max_attempts: 3
command: cd AIAgent && npm install && npm run compile && npm run dep-check
command: cd AIAgent && npm install && npm run compile && npm run dep-check
compile-cli:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: cd Common && npm install
- name: Compile CLI
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd CLI && npm install && npm run compile && npm run dep-check

21
.github/workflows/test.cli.yaml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: CLI Test
on:
pull_request:
push:
branches-ignore:
- 'hotfix-*' # excludes hotfix branches
- 'release'
jobs:
test:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: cd Common && npm install
- run: cd CLI && npm install && npm run test