Skip to content

test: skip Voxtral integration tests in CI#1

Closed
tsavo-at-pieces wants to merge 2 commits intomainfrom
fix/skip-voxtral-in-ci
Closed

test: skip Voxtral integration tests in CI#1
tsavo-at-pieces wants to merge 2 commits intomainfrom
fix/skip-voxtral-in-ci

Conversation

@tsavo-at-pieces
Copy link
Contributor

Summary

  • Skip Voxtral integration tests when running under CI/Cloud Run to avoid metadata.google.internal ADC lookup failures.
  • Uses group(..., skip: reason) so tests are still discovered (CI does not fail with "No tests found").

Test plan

  • CI=true dart test

Copilot AI review requested due to automatic review settings February 24, 2026 00:27
@cursor
Copy link

cursor bot commented Feb 24, 2026

PR Summary

Low Risk
Test-only change that conditionally skips integration tests based on environment variables; no production code paths or data handling are affected.

Overview
Voxtral integration tests are now skipped automatically in CI/Cloud Run environments by detecting CI/GCP runtime env vars via Platform.environment.

The tests are wrapped with group(..., skip: reason) so they remain discoverable while avoiding ADC/VPN-dependent failures in automated environments.

Written by Cursor Bugbot for commit 8da59bf. Configure here.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Skips the Voxtral integration test group when running in CI/Cloud Run-like environments to avoid failures caused by ADC/metadata lookups.

Changes:

  • Add _isCiOrCloudRun() helper to detect CI/Cloud Run via environment variables.
  • Apply group(..., skip: reason) so Voxtral integration tests are discovered but skipped in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 160 to 162
env.containsKey('K_SERVICE') || // Cloud Run
env.containsKey('PROJECT_ID') ||
env.containsKey('GCP_PROJECT_ID');
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_isCiOrCloudRun() treats the mere presence of PROJECT_ID / GCP_PROJECT_ID as “CI/Cloud Run”. Those env vars are not Cloud Run–specific and can be set in local dev shells, which would cause these integration tests to be skipped unexpectedly. Consider narrowing the Cloud Run detection to Cloud Run–specific vars (e.g. K_SERVICE) and/or renaming the helper to match the broader condition.

Suggested change
env.containsKey('K_SERVICE') || // Cloud Run
env.containsKey('PROJECT_ID') ||
env.containsKey('GCP_PROJECT_ID');
env.containsKey('K_SERVICE'); // Cloud Run

Copilot uses AI. Check for mistakes.
Comment on lines 157 to 159
final ciValue = env['CI']?.toLowerCase();

return ciValue == 'true' ||
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI detection currently only skips when CI is exactly 'true' (case-insensitive). Some environments set CI=1 or other truthy values, which would still run these tests in CI and reintroduce the ADC/metadata failures this PR is addressing. Consider treating any non-empty CI value as CI, or explicitly allowing '1'/'yes' as well.

Suggested change
final ciValue = env['CI']?.toLowerCase();
return ciValue == 'true' ||
final ciValue = env['CI']?.toLowerCase() ?? '';
final isCi = ciValue.isNotEmpty && ciValue != 'false' && ciValue != '0';
return isCi ||

Copilot uses AI. Check for mistakes.
Comment on lines 158 to 161

return ciValue == 'true' ||
env.containsKey('K_SERVICE') || // Cloud Run
env.containsKey('PROJECT_ID') ||

This comment was marked as outdated.

@tsavo-at-pieces
Copy link
Contributor Author

Addressed the review notes: removed / from detection (can be set locally), and treat as truthy (//etc) + / for Cloud Run. Implemented in commit 9a3451a.

@tsavo-at-pieces
Copy link
Contributor Author

Follow-up (previous comment ate backticks):

  • Removed PROJECT_ID/GCP_PROJECT_ID from detection (can be set locally).
  • Treat CI as truthy (true/1/etc) and also detect GITHUB_ACTIONS + Cloud Run via K_SERVICE.

Implemented in commit 9a3451a.

@tsavo-at-pieces
Copy link
Contributor Author

Fixed directly on main in commit cd4b73c (Voxtral tests rewritten to deterministic request-construction tests; no skipping + no external deps). Closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants