refactor(ci): Use npm ci and remove published package install

Replaces the explicit GitHub Packages configuration and published package installation with 'npm ci' in the 'test_linux', 'test_mac', and 'test_windows' jobs within 'ci.yml'.

This streamlines the unit testing process by focusing on the source code dependencies and avoids misleadingly installing the published package in the unit test phase. The 'bundle_size' job retains its specific install as it requires the published artifact.
This commit is contained in:
mkorwel
2025-10-21 22:23:36 -07:00
parent 118e3176e8
commit 56f1ffe14f
+5 -21
View File
@@ -46,13 +46,8 @@ jobs:
node-version: '${{ matrix.node-version }}'
cache: 'npm'
- name: 'Configure npm for GitHub Packages'
run: |
echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: 'Install dependencies for testing'
run: 'npm install @google-gemini/gemini-cli@${{ inputs.version }}'
- name: 'Install dependencies'
run: 'npm ci'
- name: 'Run tests and generate reports'
env:
@@ -105,13 +100,8 @@ jobs:
node-version: '${{ matrix.node-version }}'
cache: 'npm'
- name: 'Configure npm for GitHub Packages'
run: |
echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: 'Install dependencies for testing'
run: 'npm install @google-gemini/gemini-cli@${{ inputs.version }}'
- name: 'Install dependencies'
run: 'npm ci'
- name: 'Run tests and generate reports'
env:
@@ -231,14 +221,8 @@ jobs:
npm config set registry https://registry.npmjs.org/
shell: 'pwsh'
- name: 'Configure npm for GitHub Packages'
run: |
echo "@google-gemini:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
shell: 'pwsh'
- name: 'Install dependencies'
run: 'npm install @google-gemini/gemini-cli@${{ inputs.version }}'
run: 'npm ci'
shell: 'pwsh'
- name: 'Run tests and generate reports'