diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 717fb7f81de..b76d69c91f9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -162,6 +162,26 @@ jobs: PLATFORM: vm run: ./tool/ci/bots.sh + # Only run on ubuntu-latest because `flutter test --platform chrome` hangs on + # windows-latest (see https://github.com/flutter/flutter/issues/162798). + test-browser: + name: ubuntu-latest test_browser + needs: flutter-prep + runs-on: ubuntu-latest + steps: + - name: git clone + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + - name: Load Cached Flutter SDK + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 + with: + path: | + ./tool/flutter-sdk + key: flutter-sdk-${{ runner.os }}-${{ needs.flutter-prep.outputs.latest_flutter_candidate }} + - name: tool/ci/bots.sh + env: + BOT: test_browser + run: ./tool/ci/bots.sh + macos-test: needs: flutter-prep name: macos goldens ${{ matrix.bot }} @@ -395,11 +415,3 @@ jobs: # BOT: ${{ matrix.bot }} # run: ./tool/ci/bots.sh -# TODO(https://github.com/flutter/devtools/issues/2437): -# PLATFORM=chrome is going away. We need to move these tests to run with -# chromedriver. -# - BOT=test_ddc PLATFORM=chrome -# PLATFORM=chrome is going away. We need to move these tests to run with -# chromedriver. -# - BOT=test_dart2js PLATFORM=chrome - diff --git a/tool/ci/bots.sh b/tool/ci/bots.sh index 6f19b770e1f..14df1485f63 100755 --- a/tool/ci/bots.sh +++ b/tool/ci/bots.sh @@ -55,13 +55,19 @@ elif [[ "$BOT" == "test_ddc" || "$BOT" == "test_dart2js" ]]; then # used to do when integration tests were enabled). if [ "$PLATFORM" = "vm" ]; then WEBDEV_RELEASE=$USE_WEBDEV_RELEASE flutter test $FILES - elif [ "$PLATFORM" = "chrome" ]; then - WEBDEV_RELEASE=$USE_WEBDEV_RELEASE flutter test --platform chrome $FILES else echo "unknown test platform" exit 1 fi +elif [ "$BOT" = "test_browser" ]; then + FILES=$(grep -rlE --include='*_test.dart' "@TestOn\(['\"]browser['\"]\)" test | tr '\n' ' ' || true) + if [ -z "$FILES" ]; then + echo "No @TestOn('browser') test files found in test/" + exit 1 + fi + flutter test --platform chrome $FILES + elif [ "$BOT" = "test_webdriver" ]; then flutter test webdriver_test