Skip to content

Commit d6b3058

Browse files
jyaunchesclaude
andcommitted
fix(ci): skip e2e-brev tests when secrets are not available
The e2e-brev vitest project was running during normal test-unit CI which lacks Brev secrets. Use describe.runIf and vitest enabled flag to skip gracefully when BREV_API_TOKEN is not set. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5f502d6 commit d6b3058

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/e2e/brev-e2e.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,11 @@ function runRemoteTest(scriptPath) {
106106

107107
// --- suite ------------------------------------------------------------------
108108

109-
describe("Brev E2E", () => {
109+
const REQUIRED_VARS = ["BREV_API_TOKEN", "NVIDIA_API_KEY", "GITHUB_TOKEN", "INSTANCE_NAME"];
110+
const hasRequiredVars = REQUIRED_VARS.every((key) => process.env[key]);
111+
112+
describe.runIf(hasRequiredVars)("Brev E2E", () => {
110113
beforeAll(() => {
111-
// Validate required env vars up front
112-
for (const key of ["BREV_API_TOKEN", "NVIDIA_API_KEY", "GITHUB_TOKEN", "INSTANCE_NAME"]) {
113-
if (!process.env[key]) throw new Error(`${key} not set`);
114-
}
115114

116115
// Authenticate with Brev
117116
mkdirSync(path.join(homedir(), ".brev"), { recursive: true });

0 commit comments

Comments
 (0)