Skip to content

Commit

Permalink
Add integration test workflow (#169)
Browse files Browse the repository at this point in the history
* Update workflow script

* Use latest flutter-tizen

- Split long command to multiple lines.
- Remove commented code.

* Exclude tizen_app_control from test

* Clarify a name in workflow step

* Remove unnessary condition check

* Use checkout actions for flutter-tizen install

- Remove setting legacy variable.
- Remove `pwd` and use dot syntax when referencing
  from repo root.
- export path variable with custom path first.

* Fix incorrect package name

wifi_info -> wifi_info_flutter

* Use --platforms option
  • Loading branch information
HakkyuKim authored Oct 5, 2021
1 parent 0c5e362 commit 085cdc4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ jobs:
tizen security-profiles add -n platform -a $HOME/tizen-studio-data/keystore/author/platform.p12 -p platform
- name: Install flutter-tizen
if: ${{ env.HAS_CHANGED_PACKAGES == 'true' }}
run: |
git clone https://github.com/flutter-tizen/flutter-tizen.git
uses: actions/checkout@v2
with:
repository: flutter-tizen/flutter-tizen
path: flutter-tizen
- name: Build examples of changed packages
if: ${{ env.HAS_CHANGED_PACKAGES == 'true' }}
run: |
ROOT_DIR=`pwd`
export PATH=$PATH:`pwd`/flutter-tizen/bin
tools/run_command.py build --run-on-changed-packages --base-sha $(git rev-parse HEAD^)
export PATH=`pwd`/flutter-tizen/bin:$PATH
./tools/run_command.py build --run-on-changed-packages --base-sha $(git rev-parse HEAD^)
42 changes: 42 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# TODO: Support running all integration tests when it's possible to
# run self-hosted runners in parallel.
name: Integration Test

on:
pull_request:

jobs:
changed_packages:
runs-on: [self-hosted, linux]
if: ${{ github.repository_owner == 'flutter-tizen' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Install flutter-tizen
uses: actions/checkout@v2
with:
repository: flutter-tizen/flutter-tizen
path: flutter-tizen
- name: Run integration tests
run: |
export PATH=`pwd`/flutter-tizen/bin:$PATH
./tools/run_command.py test \
--platforms wearable-5.5 \
--run-on-changed-packages \
--base-sha=$(git rev-parse HEAD^) \
--exclude wearable_rotary image_picker camera webview_flutter \
video_player permission_handler geolocator battery connectivity \
device_info package_info sensors share wifi_info_flutter \
google_maps_flutter tizen_app_control
# The following packages are excluded from tests:
# wearable_rotary, image_picker: no tests.
# camera: the current test target is wearable emulator 5.5, which doesn't support this package.
# webview_flutter: the current test target is wearable emulator 5.5, which doesn't support this package.
# video_player: test frequently breaks due to memory issue(https://github.com/flutter-tizen/plugins/issues/135).
# permission_handler: permission related test.
# geolocator: test requires console manipulation.
# battery, connectivity, device_info, package_info, sensors, share, wifi_info_flutter: deprecated.
# google_maps_flutter: device limitation not yet specified.
# tizen_app_control: test available after Flutter 2.5 migration.

0 comments on commit 085cdc4

Please sign in to comment.