Skip to content

Add cloud/CI environment detection utility#19

Draft
Copilot wants to merge 4 commits intodevelopfrom
copilot/check-cloud-task-status
Draft

Add cloud/CI environment detection utility#19
Copilot wants to merge 4 commits intodevelopfrom
copilot/check-cloud-task-status

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 29, 2025

Provides programmatic detection of whether code is running in CI/cloud environments (GitHub Actions, Azure Pipelines) vs local development.

Implementation

  • EnvironmentDetector - Static utility class checking Platform.environment for CI indicators (CI, GITHUB_ACTIONS, TF_BUILD)
  • Shell script - Bash-based detector for environments without Flutter/Dart
  • CLI tool - Dart executable for standalone environment reporting
  • Test suite - Validates detection logic across platforms

Usage

import 'package:dart_wing_mobile/utils/environment_detector.dart';

// Detect cloud execution
if (EnvironmentDetector.isRunningInCloud) {
  Logger.level = LogLevel.debug;  // Verbose logging in CI
  testTimeout = Duration(minutes: 5);  // Longer timeouts
}

// Get platform details
print(EnvironmentDetector.ciPlatform);  // "GitHub Actions" | "Azure Pipelines" | "Local"

Or via shell:

./scripts/check_cloud_environment.sh

Current Environment

This PR was created in GitHub Actions (github-hosted runners), validated by the implementation itself.

Original prompt

is this task running in cloud

The user has attached the following files as relevant context:

  • .github/copilot-instructions.md

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits October 29, 2025 00:48
Co-authored-by: brettheap <1513478+brettheap@users.noreply.github.com>
Co-authored-by: brettheap <1513478+brettheap@users.noreply.github.com>
Co-authored-by: brettheap <1513478+brettheap@users.noreply.github.com>
Copilot AI changed the title [WIP] Check if task is running in the cloud Add cloud/CI environment detection utility Oct 29, 2025
Copilot AI requested a review from brettheap October 29, 2025 00:53
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