Skip to content

Commit

Permalink
Separate package testing workflow from "main" job (#6745)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzieschmoll authored Nov 15, 2023
1 parent 9ae5819 commit b06e254
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 24 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,31 @@ jobs:
run: |
dcm analyze packages/devtools_app packages/devtools_shared packages/devtools_test
test-packages:
name: ${{ matrix.package }} test
needs: flutter-prep
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- devtools_app_shared
- devtools_extensions
- devtools_shared
steps:
- name: git clone
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Load Cached Flutter SDK
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
./flutter-sdk
key: flutter-sdk-${{ runner.os }}-${{ needs.flutter-prep.outputs.latest_flutter_candidate }}
- name: tool/ci/package_tests.sh
env:
PACKAGE: ${{ matrix.package }}
run: ./tool/ci/package_tests.sh

test:
name: ${{ matrix.bot }}
needs: flutter-prep
Expand Down
24 changes: 0 additions & 24 deletions tool/ci/bots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,6 @@ if [ "$BOT" = "main" ]; then
# Analyze the code
devtools_tool analyze

popd

# Test the `devtools_app_shared`, `devtools_shared` and `devtools_extensions` package tests on the
# main bot.
pushd $DEVTOOLS_DIR/packages/devtools_app_shared
echo `pwd`
flutter test test/
popd

pushd $DEVTOOLS_DIR/packages/devtools_shared
echo `pwd`
flutter test test/
popd

pushd $DEVTOOLS_DIR/packages/devtools_extensions
echo `pwd`
flutter test test/*_test.dart
flutter test test/web --platform chrome
popd

# Change the directory back to devtools_app.
pushd $DEVTOOLS_DIR/packages/devtools_app
echo `pwd`

elif [ "$BOT" = "build_ddc" ]; then

# TODO(https://github.com/flutter/flutter/issues/43538): Remove workaround.
Expand Down
34 changes: 34 additions & 0 deletions tool/ci/package_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Fast fail the script on failures.
set -ex

source ./tool/ci/setup.sh

if [ "$PACKAGE" = "devtools_app_shared" ]; then

pushd $DEVTOOLS_DIR/packages/devtools_app_shared
echo `pwd`
flutter test test/
popd

elif [ "$PACKAGE" = "devtools_extensions" ]; then

pushd $DEVTOOLS_DIR/packages/devtools_extensions
echo `pwd`
flutter test test/*_test.dart
flutter test test/web --platform chrome
popd

elif [ "$PACKAGE" = "devtools_shared" ]; then

pushd $DEVTOOLS_DIR/packages/devtools_shared
echo `pwd`
flutter test test/
popd

fi

0 comments on commit b06e254

Please sign in to comment.