Skip to content

Commit 1fb8d7d

Browse files
jyaunchesclaude
andcommitted
refactor(ci): rewrite Brev E2E orchestrator as vitest suite
Replace the hand-rolled bash test runner (scripts/e2e-brev-test.sh) with a vitest test suite (test/e2e/brev-e2e.test.js) to leverage assertions, reporting, and async behavior from the existing test framework. Also addresses PR feedback: - Rename workflow from "hardware-e2e" to "e2e-brev" - Fix secret exposure by piping secrets via stdin instead of CLI args - Fix test_suite required+default conflict in workflow_call - Use per-PR concurrency group to avoid cancelling unrelated runs Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent fe97c9a commit 1fb8d7d

4 files changed

Lines changed: 183 additions & 163 deletions

File tree

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
name: hardware-e2e
4+
name: e2e-brev
55

66
on:
77
workflow_dispatch:
@@ -33,7 +33,7 @@ on:
3333
type: string
3434
default: ""
3535
test_suite:
36-
required: true
36+
required: false
3737
type: string
3838
default: "full"
3939
secrets:
@@ -48,11 +48,11 @@ permissions:
4848
pull-requests: write
4949

5050
concurrency:
51-
group: hardware-e2e
51+
group: e2e-brev-${{ inputs.pr_number || github.run_id }}
5252
cancel-in-progress: true
5353

5454
jobs:
55-
hardware-e2e:
55+
e2e-brev:
5656
if: github.repository == 'NVIDIA/NemoClaw'
5757
runs-on: ubuntu-latest
5858
timeout-minutes: 30
@@ -69,7 +69,7 @@ jobs:
6969
run: |
7070
PR_SHA=$(gh pr view ${{ inputs.pr_number }} --json headRefOid -q .headRefOid)
7171
CHECK_RUN_ID=$(gh api repos/${{ github.repository }}/check-runs \
72-
-f name="Hardware E2E (${{ inputs.test_suite }})" \
72+
-f name="Brev E2E (${{ inputs.test_suite }})" \
7373
-f head_sha="$PR_SHA" \
7474
-f status="in_progress" \
7575
-f "output[title]=Running on ephemeral Brev instance" \
@@ -85,14 +85,17 @@ jobs:
8585
tar -xzf /tmp/brev.tar.gz -C /usr/local/bin brev
8686
chmod +x /usr/local/bin/brev
8787
88+
- name: Install dependencies
89+
run: npm ci
90+
8891
- name: Run ephemeral Brev E2E
8992
env:
9093
BREV_API_TOKEN: ${{ secrets.BREV_API_TOKEN }}
9194
NVIDIA_API_KEY: ${{ secrets.NVIDIA_API_KEY }}
9295
GITHUB_TOKEN: ${{ github.token }}
9396
INSTANCE_NAME: e2e-pr-${{ inputs.pr_number || github.run_id }}
9497
TEST_SUITE: ${{ inputs.test_suite }}
95-
run: bash scripts/e2e-brev-test.sh
98+
run: npx vitest run --project e2e-brev --reporter=verbose
9699

97100
- name: Update check run (completed)
98101
if: always() && inputs.pr_number != '' && env.CHECK_RUN_ID != ''
@@ -104,7 +107,7 @@ jobs:
104107
-X PATCH \
105108
-f status="completed" \
106109
-f conclusion="$CONCLUSION" \
107-
-f "output[title]=Hardware E2E (${{ inputs.test_suite }}): ${CONCLUSION}" \
110+
-f "output[title]=Brev E2E (${{ inputs.test_suite }}): ${CONCLUSION}" \
108111
-f "output[summary]=See workflow run for details."
109112
110113
- name: Post PR comment
@@ -119,13 +122,13 @@ jobs:
119122
EMOJI="❌"
120123
STATUS="FAILED"
121124
fi
122-
BODY="${EMOJI} **Hardware E2E** (${{ inputs.test_suite }}): **${STATUS}** on branch \`${{ inputs.branch }}\` — [See logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
125+
BODY="${EMOJI} **Brev E2E** (${{ inputs.test_suite }}): **${STATUS}** on branch \`${{ inputs.branch }}\` — [See logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
123126
gh pr comment ${{ inputs.pr_number }} --repo ${{ github.repository }} --body "$BODY"
124127
125128
- name: Upload test logs
126129
if: failure()
127130
uses: actions/upload-artifact@v4
128131
with:
129-
name: hardware-e2e-logs
132+
name: e2e-brev-logs
130133
path: /tmp/brev-e2e-*.log
131134
if-no-files-found: ignore

‎scripts/e2e-brev-test.sh‎

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)