diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index a89db08c..c1d608f3 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -117,22 +117,22 @@ jobs: working-directory: mono_repo run: dartanalyzer . job_004: - name: "smoke_test; linux; Dart edge; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "smoke_test; linux; Dart 2.10.4; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;dart:main;packages:test_pkg;commands:dartfmt-dartanalyzer_0" + key: "os:ubuntu-latest;pub-cache-hosted;dart:2.10.4;packages:test_pkg;commands:dartfmt-dartanalyzer_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;dart:main;packages:test_pkg - os:ubuntu-latest;pub-cache-hosted;dart:main + os:ubuntu-latest;pub-cache-hosted;dart:2.10.4;packages:test_pkg + os:ubuntu-latest;pub-cache-hosted;dart:2.10.4 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - uses: dart-lang/setup-dart@v0.5 with: - sdk: main + sdk: "2.10.4" - id: checkout uses: actions/checkout@v2 - id: test_pkg_pub_upgrade @@ -181,22 +181,22 @@ jobs: working-directory: test_pkg run: dartanalyzer --fatal-infos . job_006: - name: "smoke_test; linux; Dart beta; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "smoke_test; linux; Dart 2.12.0-29.10.beta; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:test_pkg;commands:dartfmt-dartanalyzer_0" + key: "os:ubuntu-latest;pub-cache-hosted;dart:2.12.0-29.10.beta;packages:test_pkg;commands:dartfmt-dartanalyzer_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:test_pkg - os:ubuntu-latest;pub-cache-hosted;dart:beta + os:ubuntu-latest;pub-cache-hosted;dart:2.12.0-29.10.beta;packages:test_pkg + os:ubuntu-latest;pub-cache-hosted;dart:2.12.0-29.10.beta os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - uses: dart-lang/setup-dart@v0.5 with: - sdk: beta + sdk: "2.12.0-29.10.beta" - id: checkout uses: actions/checkout@v2 - id: test_pkg_pub_upgrade @@ -213,22 +213,22 @@ jobs: working-directory: test_pkg run: dartanalyzer --fatal-infos . job_007: - name: "smoke_test; linux; Dart 2.12.0-29.10.beta; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "smoke_test; linux; Dart beta; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;dart:2.12.0-29.10.beta;packages:test_pkg;commands:dartfmt-dartanalyzer_0" + key: "os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:test_pkg;commands:dartfmt-dartanalyzer_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;dart:2.12.0-29.10.beta;packages:test_pkg - os:ubuntu-latest;pub-cache-hosted;dart:2.12.0-29.10.beta + os:ubuntu-latest;pub-cache-hosted;dart:beta;packages:test_pkg + os:ubuntu-latest;pub-cache-hosted;dart:beta os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - uses: dart-lang/setup-dart@v0.5 with: - sdk: "2.12.0-29.10.beta" + sdk: beta - id: checkout uses: actions/checkout@v2 - id: test_pkg_pub_upgrade @@ -245,22 +245,22 @@ jobs: working-directory: test_pkg run: dartanalyzer --fatal-infos . job_008: - name: "smoke_test; linux; Dart stable; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "smoke_test; linux; Dart main; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:test_pkg;commands:dartfmt-dartanalyzer_0" + key: "os:ubuntu-latest;pub-cache-hosted;dart:main;packages:test_pkg;commands:dartfmt-dartanalyzer_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:test_pkg - os:ubuntu-latest;pub-cache-hosted;dart:stable + os:ubuntu-latest;pub-cache-hosted;dart:main;packages:test_pkg + os:ubuntu-latest;pub-cache-hosted;dart:main os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - uses: dart-lang/setup-dart@v0.5 with: - sdk: stable + sdk: main - id: checkout uses: actions/checkout@v2 - id: test_pkg_pub_upgrade @@ -277,22 +277,22 @@ jobs: working-directory: test_pkg run: dartanalyzer --fatal-infos . job_009: - name: "smoke_test; linux; Dart 2.10.4; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "smoke_test; linux; Dart stable; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;dart:2.10.4;packages:test_pkg;commands:dartfmt-dartanalyzer_0" + key: "os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:test_pkg;commands:dartfmt-dartanalyzer_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;dart:2.10.4;packages:test_pkg - os:ubuntu-latest;pub-cache-hosted;dart:2.10.4 + os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:test_pkg + os:ubuntu-latest;pub-cache-hosted;dart:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - uses: dart-lang/setup-dart@v0.5 with: - sdk: "2.10.4" + sdk: stable - id: checkout uses: actions/checkout@v2 - id: test_pkg_pub_upgrade diff --git a/.travis.yml b/.travis.yml index f48b18b8..27ad1f72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ jobs: env: PKGS="test_pkg" script: tool/ci.sh dartfmt dartanalyzer_0 - stage: smoke_test - name: "Dart edge; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" + name: "Dart main; PKG: test_pkg; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-infos .`" dart: be/raw/latest os: linux env: PKGS="test_pkg" diff --git a/mono_repo/CHANGELOG.md b/mono_repo/CHANGELOG.md index cab49d47..9285a8bb 100644 --- a/mono_repo/CHANGELOG.md +++ b/mono_repo/CHANGELOG.md @@ -1,6 +1,8 @@ ## 3.4.7-dev - Use the latest `dart-lang/setup-dart@v0.5`. +- Normalize Dart SDK configurations. Throw on duplicate SDKs. Sort SDKs to + maintain stable output. ## 3.4.6 diff --git a/mono_repo/lib/src/commands/github/github_yaml.dart b/mono_repo/lib/src/commands/github/github_yaml.dart index 5b6f2688..5902bfb2 100644 --- a/mono_repo/lib/src/commands/github/github_yaml.dart +++ b/mono_repo/lib/src/commands/github/github_yaml.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import 'package:meta/meta.dart'; -import 'package:pub_semver/pub_semver.dart'; import '../../ci_shared.dart'; import '../../github_config.dart'; @@ -278,7 +277,7 @@ extension on CIJobEntry { includeStage: true, ), _githubJobOs, - job.githubSdk, + job.sdk, commandEntries, additionalCacheKeys: { 'packages': packages.join('-'), @@ -299,48 +298,6 @@ extension on CIJobEntry { } } -Map _createDartSetup(String sdk) { - Version realVersion; - - try { - realVersion = Version.parse(sdk); - } on FormatException { - // noop - } - - @alwaysThrows - void unsupported() => throw UserException( - 'Unsupported Dart SDK configuration: `$sdk`.', - details: "We are currently limited by what's supported by " - 'https://github.com/marketplace/actions/setup-dart-action', - ); - - Map withMap; - if (realVersion != null) { - withMap = { - 'sdk': sdk, - }; - } else if (const { - 'beta', - 'dev', - 'stable', - CIJob.githubSetupMainSdk, - }.contains(sdk)) { - withMap = { - 'sdk': sdk, - }; - } else { - unsupported(); - } - - final map = { - 'uses': 'dart-lang/setup-dart@v0.5', - 'with': withMap, - }; - - return map; -} - /// Returns the content of a Github Action Job. /// /// See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobs @@ -377,7 +334,12 @@ Map _githubJobYaml( if (additionalCacheKeys != null) ...additionalCacheKeys, }, ), - _createDartSetup(dartVersion), + { + 'uses': 'dart-lang/setup-dart@v0.5', + 'with': { + 'sdk': dartVersion, + }, + }, { 'id': 'checkout', 'uses': 'actions/checkout@v2', diff --git a/mono_repo/lib/src/package_config.dart b/mono_repo/lib/src/package_config.dart index 39f355fb..243e264a 100644 --- a/mono_repo/lib/src/package_config.dart +++ b/mono_repo/lib/src/package_config.dart @@ -10,6 +10,7 @@ import 'package:pubspec_parse/pubspec_parse.dart'; import 'package:yaml/yaml.dart'; import 'raw_config.dart'; +import 'utilities.dart'; import 'yaml.dart'; part 'package_config.g.dart'; @@ -38,7 +39,11 @@ class PackageConfig { this.cacheDirectories, this.dartSdkConfigUsed, this.osConfigUsed, - ); + ) : assert(() { + if (sdks == null) return true; + sortNormalizeVerifySdksList(sdks, (m) => AssertionError(m)); + return true; + }()); factory PackageConfig.parse( String relativePath, @@ -83,11 +88,15 @@ class PackageConfig { var jobSdks = rawConfig.sdks; if (job is Map && job.containsKey('dart')) { final jobValue = job['dart']; - if (jobValue is List) { - jobSdks = jobValue.cast(); - } else { - jobSdks = [jobValue as String]; - } + + jobSdks = (jobValue is List) + ? jobSdks = [...jobValue.cast()] + : [jobValue as String]; + + sortNormalizeVerifySdksList( + jobSdks, + (m) => CheckedFromJsonException(job, 'dart', 'RawConfig', m), + ); } else if (jobSdks == null || jobSdks.isEmpty) { if (monoPkgYaml.containsKey('dart')) { throw CheckedFromJsonException( @@ -164,11 +173,6 @@ abstract class HasStageName { @JsonSerializable(explicitToJson: true) class CIJob implements HasStageName { - static const _edgeSdk = 'edge'; - static const _travisEdgeSdk = 'be/raw/latest'; - static const githubSetupMainSdk = 'main'; - static const _supportedSdkLiterals = {_edgeSdk, 'dev', 'beta', 'stable'}; - @JsonKey(includeIfNull: false) final String description; @@ -192,9 +196,7 @@ class CIJob implements HasStageName { String get name => description ?? _taskCommandsTickQuoted.join(', '); /// Same as [sdk] except it handles Travis-specific naming for the edge SDK. - String get travisSdk => sdk == _edgeSdk ? _travisEdgeSdk : sdk; - - String get githubSdk => sdk == _edgeSdk ? githubSetupMainSdk : sdk; + String get travisSdk => sdk == githubSetupMainSdk ? travisEdgeSdk : sdk; CIJob( this.os, @@ -203,17 +205,10 @@ class CIJob implements HasStageName { this.stageName, this.tasks, { this.description, - }) { - if (explicitSdkVersion == null && !_supportedSdkLiterals.contains(sdk)) { - final literalsPretty = - _supportedSdkLiterals.map((e) => '"$e"').join(', '); - throw ArgumentError.value( - sdk, - 'sdk', - 'If `sdk` is not a version string, it must be one of $literalsPretty.', - ); - } - } + }) : assert( + errorForSdkConfig(sdk) == null, + 'Should have caught bad sdk value `$sdk` before here!', + ); factory CIJob.fromJson(Map json) => _$CIJobFromJson(json); @@ -236,7 +231,7 @@ class CIJob implements HasStageName { return CIJob( os, package, - {_travisEdgeSdk, githubSetupMainSdk}.contains(sdk) ? _edgeSdk : sdk, + sdk, stageName, tasks, description: description, diff --git a/mono_repo/lib/src/raw_config.dart b/mono_repo/lib/src/raw_config.dart index 23f0167d..3d8d8057 100644 --- a/mono_repo/lib/src/raw_config.dart +++ b/mono_repo/lib/src/raw_config.dart @@ -4,6 +4,8 @@ import 'package:json_annotation/json_annotation.dart'; +import 'utilities.dart'; + part 'raw_config.g.dart'; @JsonSerializable(createToJson: false, disallowUnrecognizedKeys: true) @@ -22,7 +24,15 @@ class RawConfig { : stages = stages ?? [ RawStage('unit_test', ['test']) - ]; + ] { + if (sdks != null) { + sortNormalizeVerifySdksList( + sdks, + (m) => ArgumentError.value(sdks, 'sdks', m), + ); + } + if (oses != null) oses.sort(); + } factory RawConfig.fromJson(Map json) { final config = _$RawConfigFromJson(json); diff --git a/mono_repo/lib/src/utilities.dart b/mono_repo/lib/src/utilities.dart new file mode 100644 index 00000000..a19f69d6 --- /dev/null +++ b/mono_repo/lib/src/utilities.dart @@ -0,0 +1,60 @@ +// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:pub_semver/pub_semver.dart'; + +const travisEdgeSdk = 'be/raw/latest'; + +const githubSetupMainSdk = 'main'; // this maps to `be/raw/latest` + +String errorForSdkConfig(String sdk) { + try { + Version.parse(sdk); + return null; + } on FormatException { + if (!_supportedSdkLiterals.contains(sdk)) { + return 'The value "$sdk" is neither a version string nor one of ' + '$_literalsPretty.'; + } + return null; + } +} + +void sortNormalizeVerifySdksList( + List sdks, + Object Function(String message) errorFactory, +) { + sdks.sort(); + for (var i = 0; i < sdks.length; i++) { + var value = sdks[i]; + if (_allowedMainVersions.contains(value)) { + sdks[i] = value = githubSetupMainSdk; + } + final error = errorForSdkConfig(value); + if (error != null) { + // ignore: only_throw_errors + throw errorFactory(error); + } + + if (i > 0 && value == sdks[i - 1]) { + // ignore: only_throw_errors + throw errorFactory('"$value" appears more than once.'); + } + } +} + +const _supportedSdkLiterals = { + githubSetupMainSdk, + 'dev', + 'beta', + 'stable', +}; + +const _allowedMainVersions = { + 'edge', // supported for historical reasons + travisEdgeSdk, + githubSetupMainSdk, +}; + +final _literalsPretty = _supportedSdkLiterals.map((e) => '"$e"').join(', '); diff --git a/mono_repo/test/generate_test.dart b/mono_repo/test/generate_test.dart index d63e459e..787d77df 100644 --- a/mono_repo/test/generate_test.dart +++ b/mono_repo/test/generate_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:convert'; import 'package:mono_repo/mono_repo.dart'; import 'package:mono_repo/src/ci_test_script.dart'; @@ -130,6 +131,104 @@ name: pkg_name ); }); + test('fails with unsupported Dart version', () async { + await d.dir('sub_pkg', [ + d.file(monoPkgFileName, r''' +dart: + - not_a_dart + +stages: + - unit_test: + - test +'''), + d.file('pubspec.yaml', ''' +name: pkg_name + ''') + ]).create(); + + expect( + testGenerateBothConfig, + throwsAParsedYamlException( + startsWith( + 'line 2, column 3 of ${p.join('sub_pkg', 'mono_pkg.yaml')}: ' + 'Unsupported value for "dart". The value "not_a_dart" is neither a ' + 'version string nor one of "main", "dev", "beta", "stable".', + ), + ), + ); + }); + + group('fails with duplicate dart versions', () { + for (var values in [ + ['stable', 'stable'], + ['main', 'edge'], + ['main', 'be/raw/latest'], + ]) { + group('$values', () { + test('root of mono_pkg', () async { + await d.dir('sub_pkg', [ + d.file( + monoPkgFileName, + jsonEncode({ + 'dart': values, + 'stages': [ + { + 'unit_test': ['test'] + } + ] + })), + d.file('pubspec.yaml', ''' +name: pkg_name + ''') + ]).create(); + + expect( + testGenerateBothConfig, + throwsAParsedYamlException( + startsWith( + 'line 1, column 9 of sub_pkg/mono_pkg.yaml: Unsupported value ' + 'for "dart". "${values.first}" appears more than once.', + ), + ), + ); + }); + + test('within test', () async { + await d.dir('sub_pkg', [ + d.file( + monoPkgFileName, + jsonEncode({ + 'stages': [ + { + 'unit_test': [ + { + 'test': '', + 'dart': values, + } + ] + } + ] + })), + d.file('pubspec.yaml', ''' +name: pkg_name + ''') + ]).create(); + + expect( + testGenerateBothConfig, + throwsAParsedYamlException( + startsWith( + 'line 1, column 44 of ${p.join('sub_pkg', 'mono_pkg.yaml')}: ' + 'Unsupported value for "dart". "${values.first}" appears more ' + 'than once.', + ), + ), + ); + }); + }); + } + }); + test('fails with legacy file name', () async { await d.dir('sub_pkg', [ d.file('.mono_repo.yml', ''), @@ -519,7 +618,7 @@ line 3, column 7 of ${p.normalize('pkg_a/mono_pkg.yaml')}: A "dart" key is requi await d.dir('pkg_a', [ d.file(monoPkgFileName, r''' dart: -- unneeded +- stable os: - unneeded @@ -554,7 +653,7 @@ name: pkg_a testGenerateBothConfig( printMatcher: ''' package:pkg_a - `dart` values (unneeded) are not used and can be removed. + `dart` values (stable) are not used and can be removed. `os` values (unneeded) are not used and can be removed. $_writeScriptOutput''', ); diff --git a/mono_repo/test/mono_config_test.dart b/mono_repo/test/mono_config_test.dart index 67d92513..249fc85f 100644 --- a/mono_repo/test/mono_config_test.dart +++ b/mono_repo/test/mono_config_test.dart @@ -2,9 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Doing a copy-paste from JSON – which uses double-quotes -// ignore_for_file: prefer_single_quotes - import 'dart:convert'; import 'package:mono_repo/src/package_config.dart'; @@ -54,7 +51,7 @@ void main() { final config = _parse(monoYaml); - expect(config.sdks, unorderedEquals(['dev', 'stable', '1.23.0'])); + expect(config.sdks, ['1.23.0', 'dev', 'stable']); final jobs = config.jobs.map((tj) => tj.toJson()).toList(); @@ -396,17 +393,15 @@ line 12, column 4: Stages must be unique. "a" appears more than once. ] }; - expect( - () => _parse(monoYaml), - throwsA( - isA().having( - (e) => e.message, - 'message', - 'If `sdk` is not a version string, it must be one of ' - '"edge", "dev", "beta", "stable".', - ), - ), - ); + _expectParseThrows(monoYaml, r''' +line 2, column 10: Unsupported value for "dart". The value "latest" is neither a version string nor one of "main", "dev", "beta", "stable". + ╷ +2 │ "dart": [ + │ ┌──────────^ +3 │ │ "latest" +4 │ │ ], + │ └──^ + ╵'''); }); }); } @@ -444,160 +439,160 @@ stages: List get _testConfig1expectedOutput => [ { - "description": "dartanalyzer && dartfmt", - "os": "windows", - "package": "a", - "sdk": "dev", - "stageName": "analyze_and_format", - "tasks": [ - {"name": "dartanalyzer", "args": "--fatal-infos --fatal-warnings ."}, - {"name": "dartfmt"} + 'description': 'dartanalyzer && dartfmt', + 'os': 'windows', + 'package': 'a', + 'sdk': 'dev', + 'stageName': 'analyze_and_format', + 'tasks': [ + {'name': 'dartanalyzer', 'args': '--fatal-infos --fatal-warnings .'}, + {'name': 'dartfmt'} ] }, { - "description": "dartanalyzer && dartfmt", - "os": "linux", - "package": "a", - "sdk": "dev", - "stageName": "analyze_and_format", - "tasks": [ - {"name": "dartanalyzer", "args": "--fatal-infos --fatal-warnings ."}, - {"name": "dartfmt"} + 'description': 'dartanalyzer && dartfmt', + 'os': 'linux', + 'package': 'a', + 'sdk': 'dev', + 'stageName': 'analyze_and_format', + 'tasks': [ + {'name': 'dartanalyzer', 'args': '--fatal-infos --fatal-warnings .'}, + {'name': 'dartfmt'} ] }, { - "os": "osx", - "package": "a", - "sdk": "1.23.0", - "stageName": "analyze_and_format", - "tasks": [ - {"name": "dartanalyzer", "args": "--fatal-infos --fatal-warnings ."} + 'os': 'osx', + 'package': 'a', + 'sdk': '1.23.0', + 'stageName': 'analyze_and_format', + 'tasks': [ + {'name': 'dartanalyzer', 'args': '--fatal-infos --fatal-warnings .'} ] }, { - "os": "linux", - "package": "a", - "sdk": "dev", - "stageName": "unit_test", - "tasks": [ - {"name": "test", "args": "--platform chrome"} + 'os': 'linux', + 'package': 'a', + 'sdk': '1.23.0', + 'stageName': 'unit_test', + 'tasks': [ + {'name': 'test', 'args': '--platform chrome'} ] }, { - "os": "linux", - "package": "a", - "sdk": "stable", - "stageName": "unit_test", - "tasks": [ - {"name": "test", "args": "--platform chrome"} + 'os': 'linux', + 'package': 'a', + 'sdk': 'dev', + 'stageName': 'unit_test', + 'tasks': [ + {'name': 'test', 'args': '--platform chrome'} ] }, { - "os": "linux", - "package": "a", - "sdk": "1.23.0", - "stageName": "unit_test", - "tasks": [ - {"name": "test", "args": "--platform chrome"} + 'os': 'linux', + 'package': 'a', + 'sdk': 'stable', + 'stageName': 'unit_test', + 'tasks': [ + {'name': 'test', 'args': '--platform chrome'} ] }, { - "os": "linux", - "package": "a", - "sdk": "dev", - "stageName": "unit_test", - "tasks": [ + 'os': 'linux', + 'package': 'a', + 'sdk': '1.23.0', + 'stageName': 'unit_test', + 'tasks': [ { - "name": "test", - "args": "--preset travis --total-shards 5 --shard-index 0" + 'name': 'test', + 'args': '--preset travis --total-shards 5 --shard-index 0' } ] }, { - "os": "linux", - "package": "a", - "sdk": "stable", - "stageName": "unit_test", - "tasks": [ + 'os': 'linux', + 'package': 'a', + 'sdk': 'dev', + 'stageName': 'unit_test', + 'tasks': [ { - "name": "test", - "args": "--preset travis --total-shards 5 --shard-index 0" + 'name': 'test', + 'args': '--preset travis --total-shards 5 --shard-index 0' } ] }, { - "os": "linux", - "package": "a", - "sdk": "1.23.0", - "stageName": "unit_test", - "tasks": [ + 'os': 'linux', + 'package': 'a', + 'sdk': 'stable', + 'stageName': 'unit_test', + 'tasks': [ { - "name": "test", - "args": "--preset travis --total-shards 5 --shard-index 0" + 'name': 'test', + 'args': '--preset travis --total-shards 5 --shard-index 0' } ] }, { - "os": "linux", - "package": "a", - "sdk": "dev", - "stageName": "unit_test", - "tasks": [ + 'os': 'linux', + 'package': 'a', + 'sdk': '1.23.0', + 'stageName': 'unit_test', + 'tasks': [ { - "name": "test", - "args": "--preset travis --total-shards 5 --shard-index 1" + 'name': 'test', + 'args': '--preset travis --total-shards 5 --shard-index 1' } ] }, { - "os": "linux", - "package": "a", - "sdk": "stable", - "stageName": "unit_test", - "tasks": [ + 'os': 'linux', + 'package': 'a', + 'sdk': 'dev', + 'stageName': 'unit_test', + 'tasks': [ { - "name": "test", - "args": "--preset travis --total-shards 5 --shard-index 1" + 'name': 'test', + 'args': '--preset travis --total-shards 5 --shard-index 1' } ] }, { - "os": "linux", - "package": "a", - "sdk": "1.23.0", - "stageName": "unit_test", - "tasks": [ + 'os': 'linux', + 'package': 'a', + 'sdk': 'stable', + 'stageName': 'unit_test', + 'tasks': [ { - "name": "test", - "args": "--preset travis --total-shards 5 --shard-index 1" + 'name': 'test', + 'args': '--preset travis --total-shards 5 --shard-index 1' } ] }, { - "os": "linux", - "package": "a", - "sdk": "dev", - "stageName": "unit_test", - "tasks": [ - {"name": "test"} + 'os': 'linux', + 'package': 'a', + 'sdk': '1.23.0', + 'stageName': 'unit_test', + 'tasks': [ + {'name': 'test'} ] }, { - "os": "linux", - "package": "a", - "sdk": "stable", - "stageName": "unit_test", - "tasks": [ - {"name": "test"} + 'os': 'linux', + 'package': 'a', + 'sdk': 'dev', + 'stageName': 'unit_test', + 'tasks': [ + {'name': 'test'} ] }, { - "os": "linux", - "package": "a", - "sdk": "1.23.0", - "stageName": "unit_test", - "tasks": [ - {"name": "test"} + 'os': 'linux', + 'package': 'a', + 'sdk': 'stable', + 'stageName': 'unit_test', + 'tasks': [ + {'name': 'test'} ] } ]; diff --git a/test_pkg/mono_pkg.yaml b/test_pkg/mono_pkg.yaml index 36469877..4d186da0 100644 --- a/test_pkg/mono_pkg.yaml +++ b/test_pkg/mono_pkg.yaml @@ -7,8 +7,15 @@ stages: - group: - dartfmt - dartanalyzer: --fatal-infos . - dart: [edge, dev, 2.12.0-0.0.dev, beta, 2.12.0-29.10.beta, stable, 2.10.4] + dart: + - beta + - dev + - edge + - stable + - 2.10.4 + - 2.12.0-0.0.dev + - 2.12.0-29.10.beta - unit_test: - test: --test-randomize-ordering-seed=random os: - - linux + - linux