mirror of
https://github.com/flutter/packages.git
synced 2025-06-28 22:02:38 +08:00
[ci] Add LUCI version of dart unit tests (#4265)
Add initial LUCI versions of the dart unit tests task. Part of https://github.com/flutter/flutter/issues/114373
This commit is contained in:
44
.ci.yaml
44
.ci.yaml
@ -92,6 +92,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
|
||||
recipe: packages/packages
|
||||
timeout: 30
|
||||
|
18
.ci/scripts/dart_unit_tests_pathified.sh
Normal file
18
.ci/scripts/dart_unit_tests_pathified.sh
Normal file
@ -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 .
|
11
.ci/targets/dart_unit_tests.yaml
Normal file
11
.ci/targets/dart_unit_tests.yaml
Normal file
@ -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
|
Reference in New Issue
Block a user