Files
gemini-cli/.github/workflows/e2e.yml
Daniel Young Lee f9c3e0d71a test: add support for testing native binaries
- Update TestRig to support GEMINI_BINARY environment variable
- Add E2E smoke test job for native Linux binary
- Minimal addition that runs in parallel with existing tests
2025-08-10 13:22:38 -07:00

95 lines
2.8 KiB
YAML

# .github/workflows/e2e.yml
name: E2E Tests
on:
push:
branches: [main]
merge_group:
jobs:
e2e-test-linux:
name: E2E Test (Linux) - ${{ matrix.sandbox }}
runs-on: ubuntu-latest
strategy:
matrix:
sandbox: [sandbox:none, sandbox:docker]
node-version: [20.x, 22.x, 24.x]
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Set up Docker
if: matrix.sandbox == 'sandbox:docker'
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
- name: Set up Podman
if: matrix.sandbox == 'sandbox:podman'
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run E2E tests
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: npm run test:integration:${{ matrix.sandbox }} -- --verbose --keep-output
e2e-test-macos:
name: E2E Test - macOS
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run E2E tests
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: npm run test:e2e
e2e-test-native-binary:
name: E2E Native Binary Smoke Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20.x
cache: 'npm'
- uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
with:
bun-version: '1.2.20'
- run: npm ci
- run: npm run bundle
- run: npm run build:binaries
- name: Smoke test native binary
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_BINARY: ${{ github.workspace }}/bundle/binaries/gemini-cli-linux-x64
run: npm run test:integration:sandbox:none -- list_directory