Skip to content

Commit

Permalink
Don't start websocket streaming if running in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Jul 22, 2024
1 parent 8d51872 commit 81a06a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vrchat_dart/example/bin/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:convert';
import 'dart:io';

import 'package:otp/otp.dart';
import 'package:vrchat_dart/vrchat_dart.dart';
Expand Down Expand Up @@ -96,6 +97,9 @@ void main() async {
.getWorld(worldId: worldsResponse.data!.first.id);
print(getWorldResponse.data!.name);

// Do not start websocket streaming if this code is running in CI
if (Platform.environment.containsKey('GITHUB_ACTIONS')) return;

// Listen for updates
api.streaming.vrcEventStream.listen(handleVrcEvent);
api.streaming.start();
Expand Down

0 comments on commit 81a06a7

Please sign in to comment.