Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Add LUCI version of dart unit tests #4265

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions .ci/scripts/dart_unit_tests_pathified.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions .ci/targets/dart_unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -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