mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-09 17:40:44 -07:00
feat: address PR feedback
- Use reusable npmrc action in workflows - Make package name dynamic in e2e tests - Add rationale for configure-registry script - Force orchestrator to run in dev environment
This commit is contained in:
@@ -33,10 +33,10 @@ jobs:
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm ci'
|
||||
|
||||
- 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: 'Setup NPMRC'
|
||||
uses: ./.github/actions/setup-npmrc
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Bundle'
|
||||
run: 'npm run bundle'
|
||||
|
||||
+19
-19
@@ -9,6 +9,10 @@ on:
|
||||
description: 'The version of the published package'
|
||||
required: true
|
||||
type: 'string'
|
||||
cli-package-name:
|
||||
description: 'The name of the CLI package to install'
|
||||
required: true
|
||||
type: 'string'
|
||||
secrets:
|
||||
GEMINI_API_KEY:
|
||||
required: true
|
||||
@@ -31,7 +35,6 @@ jobs:
|
||||
- 'sandbox:docker'
|
||||
node-version:
|
||||
- '20.x'
|
||||
|
||||
steps:
|
||||
- name: 'Checkout (fork)'
|
||||
uses: 'actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955' # ratchet:actions/checkout@v5
|
||||
@@ -46,15 +49,13 @@ jobs:
|
||||
with:
|
||||
ref: '${{ github.event.inputs.branch_ref || github.ref }}'
|
||||
|
||||
- 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: 'Setup NPMRC'
|
||||
uses: ./.github/actions/setup-npmrc
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm install @google-gemini/gemini-cli@${{ inputs.version }}'
|
||||
|
||||
- name: 'Set up Docker'
|
||||
run: 'npm install ${{ inputs.cli-package-name }}@${{ inputs.version }}'
|
||||
if: "matrix.sandbox == 'sandbox:docker'"
|
||||
uses: 'docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435' # ratchet:docker/setup-buildx-action@v3
|
||||
|
||||
@@ -100,10 +101,10 @@ jobs:
|
||||
with:
|
||||
node-version: '20.x'
|
||||
|
||||
- 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: 'Setup NPMRC'
|
||||
uses: ./.github/actions/setup-npmrc
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm install @google-gemini/gemini-cli@${{ inputs.version }}'
|
||||
@@ -171,14 +172,13 @@ 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: 'Setup NPMRC'
|
||||
uses: ./.github/actions/setup-npmrc
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm install @google-gemini/gemini-cli@${{ inputs.version }}'
|
||||
run: 'npm install ${{ inputs.cli-package-name }}@${{ inputs.version }}'
|
||||
shell: 'pwsh'
|
||||
|
||||
- name: 'Run E2E tests'
|
||||
@@ -216,4 +216,4 @@ jobs:
|
||||
echo "One or more E2E jobs failed."
|
||||
exit 1
|
||||
fi
|
||||
echo "All required E2E jobs passed!"
|
||||
echo "All required E2E jobs passed!"
|
||||
@@ -47,8 +47,10 @@ jobs:
|
||||
name: 'E2E Checks'
|
||||
needs: 'build-and-publish'
|
||||
uses: './.github/workflows/e2e.yml'
|
||||
environment: dev
|
||||
with:
|
||||
version: '${{ needs.build-and-publish.outputs.version }}'
|
||||
cli-package-name: '${{ vars.CLI_PACKAGE_NAME }}'
|
||||
secrets:
|
||||
GEMINI_API_KEY: '${{ secrets.GEMINI_API_KEY }}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user