Test all repo configs#1149
Test all repo configs#1149fluttergithubbot merged 6 commits intoflutter:masterfrom christopherfujino:test-all-repo-configs
Conversation
| set -euxo pipefail | ||
|
|
||
| echo "Running config tests for all repos" | ||
| pushd app_dart > /dev/null |
There was a problem hiding this comment.
FYI this path cannot be found
There was a problem hiding this comment.
thanks, i think i know how to fix
| const Repo({ | ||
| @required this.name, | ||
| @required this.remoteUrl, | ||
| this.ref = 'master', |
There was a problem hiding this comment.
Future work: How should we collect the branches that we also validate on?
There was a problem hiding this comment.
these can be implemented as separate entries in the allRepos list.
|
|
||
| final io.ProcessResult result = io.Process.runSync( | ||
| 'git', | ||
| <String>['clone', '-b', repo.ref, '--', repo.remoteUrl, dir.path], |
There was a problem hiding this comment.
Since we only care about .ci.yaml, should we just download that file instead of cloning the entire repo?
There was a problem hiding this comment.
yeah, that's a good idea.
| pushd "$1" > /dev/null | ||
| flutter clean | ||
| pub get | ||
| dart pub get |
There was a problem hiding this comment.
This is the officially recommended way to do this now.
|
|
||
| echo "############# files that require formatting ###########" | ||
| dartfmt -n --line-length=120 --set-exit-if-changed . | ||
| dartfmt --dry-run --line-length=120 --set-exit-if-changed . |
There was a problem hiding this comment.
-n == --dry-run.
| if grep -lq "build_runner" pubspec.yaml; then | ||
| echo "############# build ###########" | ||
| pub run build_runner build --delete-conflicting-outputs | ||
| dart run build_runner build --delete-conflicting-outputs |
There was a problem hiding this comment.
ditto, this is preferred over pub run
|
updated and fixed tests, PTAL @CaseyHillers |
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| import 'package:appengine/appengine.dart'; |
There was a problem hiding this comment.
what's package:logging? I don't see it in the pubspec.yaml
There was a problem hiding this comment.
It's already a transitive dependency, so feel free to add it as a dependency. We shouldn't rely on the various gcloud libraries (when possible) as they import dart:mirrors which can't run in Flutter.
There was a problem hiding this comment.
I'm reusing the remoteFileContent() method, which requires a Logging instance, as defined by package:appengine: https://pub.dev/documentation/appengine/latest/appengine/Logging-class.html
| Future<void> main() async { | ||
| for (final String configFile in configFiles) { | ||
| test('validate config file of $configFile', () async { | ||
| final String configContent = await remoteFileContent( |
There was a problem hiding this comment.
@CaseyHillers you're going to run into merge conflicts with this on #1150
part of flutter/flutter#79579