File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,14 @@ class CocoonFileComparator extends LocalFileComparator {
5050 return super .getGoldenBytes (golden);
5151 }
5252
53- static bool get _isLuciCi {
54- return ! kIsWeb && Platform .environment.containsKey ('LUCI_CONTEXT' );
53+ static bool get _isRunningOnCi {
54+ if (kIsWeb) {
55+ return false ;
56+ }
57+ return const [
58+ 'LUCI_CONTEXT' ,
59+ 'GITHUB_ACTIONS' ,
60+ ].any (Platform .environment.containsKey);
5561 }
5662
5763 void _registerTestFailure (Uint8List imageBytes, Uri golden) {
@@ -73,7 +79,7 @@ class CocoonFileComparator extends LocalFileComparator {
7379 @override
7480 Future <bool > compare (Uint8List imageBytes, Uri golden) async {
7581 final goldenBytes = await _tryGetGoldenBytes (golden);
76- if (goldenBytes == null && _isLuciCi ) {
82+ if (goldenBytes == null && _isRunningOnCi ) {
7783 _registerTestFailure (imageBytes, golden);
7884 return true ;
7985 }
@@ -85,7 +91,7 @@ class CocoonFileComparator extends LocalFileComparator {
8591
8692 if (! result.passed && result.diffPercent > _kGoldenDiffTolerance) {
8793 final error = await generateFailureOutput (result, golden, basedir);
88- if (_isLuciCi ) {
94+ if (_isRunningOnCi ) {
8995 _registerTestFailure (imageBytes, golden);
9096 return true ;
9197 }
You can’t perform that action at this time.
0 commit comments