From 56f1ffe14f79b8c226b4403f6f7a113f28785756 Mon Sep 17 00:00:00 2001 From: mkorwel Date: Tue, 21 Oct 2025 22:23:36 -0700 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0a43e8ae6..7b279421b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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'