You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damondouglas (via GitHub)" <gi...@apache.org> on 2023/02/03 22:23:19 UTC

[GitHub] [beam] damondouglas commented on a diff in pull request #25254: Playground Frontend Test workflow (#24728)

damondouglas commented on code in PR #25254:
URL: https://github.com/apache/beam/pull/25254#discussion_r1096337475


##########
.github/workflows/playground_frontend_test.yml:
##########
@@ -0,0 +1,91 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Playground Frontend Test
+
+on:
+  push:
+    paths: ['playground/frontend/**']
+    branches: ['**']
+  pull_request:
+    paths: ['playground/frontend/**']
+    branches: ['**']
+  workflow_dispatch:
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+  cancel-in-progress: true
+
+jobs:
+  playground_frontend_test:
+    name: Playground Frontend Test
+    runs-on: ubuntu-latest
+
+    env:
+      FLUTTER_VERSION: '3.3.2'
+
+    steps:
+      - uses: actions/checkout@v3
+
+      - name: 'Cache Flutter Dependencies'
+        uses: actions/cache@v3
+        with:
+          path: /opt/hostedtoolcache/flutter
+          key: ${{ runner.OS }}-flutter-install-cache-${{ env.FLUTTER_VERSION }}
+          restore-keys: ${{ runner.OS }}-flutter-install-cache
+
+      - uses: subosito/flutter-action@v2
+        with:
+          flutter-version: ${{ env.FLUTTER_VERSION }}
+          channel: 'stable'
+
+      - name: 'Install Dependencies'
+        working-directory: playground/frontend
+        run: |
+          cd playground_components && flutter pub get && cd ..
+          cd playground_components_dev && flutter pub get && cd ..
+          flutter pub get
+
+#      - name: 'Formatting'
+#        run: dart format --output=none --set-exit-if-changed .
+
+#      - name: 'Analyze playground_components'
+#        working-directory: playground/frontend/playground_components
+#        run: dart analyze --fatal-infos
+
+#      - name: 'Analyze playground_components_dev'
+#        working-directory: playground/frontend/playground_components_dev
+#        run: dart analyze --fatal-infos
+
+#      - name: 'Analyze playground'
+#        working-directory: playground/frontend
+#        run: dart analyze --fatal-infos lib test
+
+      - name: 'Test playground_components'
+        working-directory: playground/frontend/playground_components
+        run: flutter test
+
+      - name: 'Test playground'
+        working-directory: playground/frontend
+        run: flutter test
+
+      - uses: nanasess/setup-chromedriver@v1
+
+      - name: 'Integration tests'
+        run: |
+          cp playground/frontend/lib/config.example.dart playground/frontend/lib/config.g.dart
+          chromedriver --port=4444 &
+          ./gradlew :playground:frontend:integrationTest -PdeviceId=web-server

Review Comment:
   Were you able to get the chromedriver to work in GitHub actions prior to submitting this PR?
   
   I got the following error using Cloud Shell.
   
   ```
   > Task :playground:frontend:integrationTest_standalone_change_example_sdk_run
   Downloading Web SDK...                                           2,499ms
   Downloading CanvasKit...                                           424ms
   Running "flutter pub get" in frontend...                         2,898ms
   Launching integration_test/standalone_change_example_sdk_run_test.dart on Web Server in debug mode...
   Waiting for connection from debug service on Web Server...         54.2s
   integration_test/standalone_change_example_sdk_run_test.dart is being served at http://localhost:34205
   The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
   
   UnknownException (13): unknown error: cannot find Chrome binary
     (Driver info: chromedriver=110.0.5481.30 (aedb656755c469651f01505a4f15e153fc606a1e-refs/branch-heads/5481@{#191}),platform=Linux 5.15.65+ x86_64)
   #0      parseJsonWireResponse (package:webdriver/src/handler/json_wire/utils.dart:82:9)
   #1      JsonWireSessionHandler.parseInfoResponse (package:webdriver/src/handler/json_wire/session.dart:27:21)
   #2      JsonWireSessionHandler.parseCreateResponse (package:webdriver/src/handler/json_wire/session.dart:18:7)
   #3      InferSessionHandler.parseCreateResponse (package:webdriver/src/handler/infer_handler.dart:100:39)
   #4      AsyncRequestClient.send (package:webdriver/src/common/request_client.dart:96:32)
   <asynchronous suspension>
   #5      createDriver (package:webdriver/async_core.dart:64:19)
   <asynchronous suspension>
   #6      WebDriverService.startTest (package:flutter_tools/src/drive/web_driver_service.dart:146:19)
   <asynchronous suspension>
   #7      DriveCommand.runCommand (package:flutter_tools/src/commands/drive.dart:275:30)
   <asynchronous suspension>
   #8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1209:27)
   <asynchronous suspension>
   #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
   <asynchronous suspension>
   #10     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
   <asynchronous suspension>
   #11     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
   <asynchronous suspension>
   #12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
   <asynchronous suspension>
   #13     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
   <asynchronous suspension>
   #14     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
   <asynchronous suspension>
   #15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
   <asynchronous suspension>
   #16     main (package:flutter_tools/executable.dart:91:3)
   <asynchronous suspension>
   
   
   > Task :playground:frontend:integrationTest_standalone_change_example_sdk_run FAILED
   
   FAILURE: Build failed with an exception.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org