diff --git a/.github/workflows/health_base.yaml b/.github/workflows/health_base.yaml index 6b7c4c16..27df6fef 100644 --- a/.github/workflows/health_base.yaml +++ b/.github/workflows/health_base.yaml @@ -127,8 +127,7 @@ jobs: if: ${{ inputs.check == 'coverage' }} - name: Install firehose - run: dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ --git-ref=forceFlutter - # DO-NOT-SUBMIT + run: dart pub global activate firehose if: ${{ !inputs.local_debug }} - name: Install local firehose diff --git a/pkgs/quest/bin/quest.dart b/pkgs/quest/bin/quest.dart index 7e8075bf..252dbb44 100644 --- a/pkgs/quest/bin/quest.dart +++ b/pkgs/quest/bin/quest.dart @@ -17,16 +17,17 @@ Future main(List arguments) async { var gitUri = arguments[1].replaceRange(0, 'git'.length, 'https'); gitUri = gitUri.substring(0, gitUri.length - '.git'.length); final branch = arguments[2]; - final lines = arguments[3].split('\n'); - final labels = lines - .sublist(1, lines.length - 1) + final labels = arguments[3] + .split('\n') .map((e) => e.trim()) .where((line) => line.startsWith('ecosystem-test')); print('Labels: $labels'); final packages = fire.Repository().locatePackages(); //TODO: Possibly run for all packages, not just the first. - final package = packages.firstWhereOrNull((package) => - labels.any((label) => label == 'ecosystem-test-${package.name}')); + final package = packages.firstWhereOrNull( + (package) => + labels.any((label) => label == 'ecosystem-test-${package.name}'), + ); if (package != null) { print('Found $package. Embark on a quest!'); final version = '${package.name}:${json.encode({ @@ -35,13 +36,10 @@ Future main(List arguments) async { 'ref': branch, 'path': p.relative(package.directory.path, from: Directory.current.path) - } + }, })}'; - final chronicles = await Quest( - package.name, - version, - repositoriesFile, - ).embark(); + final chronicles = + await Quest(package.name, version, repositoriesFile).embark(); final comment = createComment(chronicles); await writeComment(comment); print(chronicles); @@ -49,11 +47,7 @@ Future main(List arguments) async { } } -enum Level { - solve, - analyze, - test; -} +enum Level { solve, analyze, test } /// The result of embarking on a quest. Stores the [package] which was tested /// with its new [version] as well as the [chapters] of the chronicles, each @@ -84,8 +78,10 @@ class Chapter { bool get success => failure == null; - Level? get failure => Level.values.firstWhereOrNull((level) => - before[level]?.success == true && after[level]?.success == false); + Level? get failure => Level.values.firstWhereOrNull( + (level) => + before[level]?.success == true && after[level]?.success == false, + ); String toRow(Application application) => ''' | ${application.name} | ${Level.values.map((l) => '${before[l]?.success.toEmoji ?? '-'}/${after[l]?.success.toEmoji ?? '-'}').join(' | ')} |'''; @@ -179,8 +175,11 @@ class Quest { await runFlutter(['clean'], path); print('Rev package:$candidatePackage to version $version $application'); - final revSuccess = - await runFlutter(['pub', 'add', version], path, true); + final revSuccess = await runFlutter( + ['pub', 'add', version], + path, + true, + ); print('Run checks for modified package'); final resultAfter = await runChecks(path, application.level);