diff --git a/.ci.yaml b/.ci.yaml index 275a8f1a179e..b27bcd5cb715 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -79,6 +79,50 @@ targets: channel: master version_file: flutter_master.version + - name: Linux dart_unit_test_shard_1 master + bringup: true # New target + recipe: packages/packages + timeout: 60 + properties: + target_file: dart_unit_tests.yaml + channel: master + version_file: flutter_master.version + cores: "32" + package_sharding: "--shardIndex 0 --shardCount 2" + + - name: Linux dart_unit_test_shard_2 master + bringup: true # New target + recipe: packages/packages + timeout: 60 + properties: + target_file: dart_unit_tests.yaml + channel: master + version_file: flutter_master.version + cores: "32" + package_sharding: "--shardIndex 1 --shardCount 2" + + - name: Linux dart_unit_test_shard_1 stable + bringup: true # New target + recipe: packages/packages + timeout: 60 + properties: + target_file: dart_unit_tests.yaml + channel: stable + version_file: flutter_stable.version + cores: "32" + package_sharding: "--shardIndex 0 --shardCount 2" + + - name: Linux dart_unit_test_shard_2 stable + bringup: true # New target + recipe: packages/packages + timeout: 60 + properties: + target_file: dart_unit_tests.yaml + channel: stable + version_file: flutter_stable.version + cores: "32" + package_sharding: "--shardIndex 1 --shardCount 2" + - name: Linux analyze master bringup: true # New target recipe: packages/packages diff --git a/.ci/scripts/dart_unit_tests_pathified.sh b/.ci/scripts/dart_unit_tests_pathified.sh new file mode 100644 index 000000000000..8a4bac50d3aa --- /dev/null +++ b/.ci/scripts/dart_unit_tests_pathified.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +set -e + +# Pathify the dependencies on changed packages (excluding major version +# changes, which won't affect clients). +./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates +# This uses --run-on-dirty-packages rather than --packages-for-branch +# since only the packages changed by 'make-deps-path-based' need to be +# re-checked. +dart ./script/tool/bin/flutter_plugin_tools.dart dart-test --run-on-dirty-packages \ + --log-timing --exclude=script/configs/dart_unit_tests_exceptions.yaml \ + $PACKAGE_SHARDING +# Restore the tree to a clean state, to avoid accidental issues if +# other script steps are added to the enclosing task. +git checkout . diff --git a/.ci/targets/dart_unit_tests.yaml b/.ci/targets/dart_unit_tests.yaml new file mode 100644 index 000000000000..8f86e0d1b492 --- /dev/null +++ b/.ci/targets/dart_unit_tests.yaml @@ -0,0 +1,11 @@ +tasks: + - name: prepare tool + script: .ci/scripts/prepare_tool.sh + - name: Dart unit tests + script: script/tool_runner.sh + args: ["dart-test", "--exclude=script/configs/dart_unit_tests_exceptions.yaml"] + # Re-run tests with path-based dependencies to ensure that publishing + # the changes won't break tests of other packages in the respository + # that depend on it. + - name: Dart unit tests - pathified + script: .ci/scripts/dart_unit_tests_pathified.sh