Skip to content

chore(deps): bump com.android.tools:desugar_jdk_libs from 2.0.4 to 2.1.2 in /example/android #222

chore(deps): bump com.android.tools:desugar_jdk_libs from 2.0.4 to 2.1.2 in /example/android

chore(deps): bump com.android.tools:desugar_jdk_libs from 2.0.4 to 2.1.2 in /example/android #222

# Copyright 2023 Google LLC
#
# Licensed 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
#
# https://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: Run integration tests
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
android:
if: contains(github.base_ref, 'main')
timeout-minutes: 45
strategy:
matrix:
patrol_cli_version: [2.7.0]
working_directory: ["example"]
runs-on:
labels: ubuntu-latest-8core
env:
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
steps:
- name: Fail if workflow has no access to API key
if: ${{ env.MAPS_API_KEY == '' }}
run: |
echo "MAPS_API_KEY is not available or empty."
exit 1
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- uses: actions/cache@v4
name: AVD Cache
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
flutter-version: "3.22.x"
channel: "stable"
cache: true
- name: Install patrol_cli
run: flutter pub global activate patrol_cli ${{ matrix.patrol_cli_version }}
- name: Run flutter pub get
run: flutter pub get
- name: Create and start emulator
run: |
echo "List installed packages"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed
echo "Installing system image"
echo "y" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;google_apis;x86_64"
echo "Creating AVD"
echo "no" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager create avd -n test_emulator -k "system-images;android-33;google_apis;x86_64" --force
echo "Starting emulator"
$ANDROID_SDK_ROOT/emulator/emulator -avd test_emulator -no-audio -no-boot-anim -no-window &
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
- name: Generate gradlew file with flutter build
working-directory: ${{ matrix.working_directory }}
run: flutter build apk --config-only
- name: Run integration tests
working-directory: ${{ matrix.working_directory }}
run: patrol test --verbose
- name: Upload test report
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: android_integration_test_report
path: example/build/app/reports/androidTests/connected/
retention-days: 5
ios:
if: contains(github.base_ref, 'main')
timeout-minutes: 90
strategy:
matrix:
patrol_cli_version: [2.7.0]
working_directory: ["example"]
runs-on:
labels: macos-13-large
env:
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
steps:
- name: Fail if workflow has no access to API key
if: ${{ env.MAPS_API_KEY == '' }}
run: |
echo "MAPS_API_KEY is not available or empty."
exit 1
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
flutter-version: "3.22.x"
channel: "stable"
cache: true
- uses: actions/cache@v4
with:
path: "**/Pods"
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Select XCode 15.1
run: sudo xcode-select -s '/Applications/Xcode_15.1.app/Contents/Developer'
- name: Start iOS simulator
run: |
RESULT=0
while [[ $RESULT == 0 ]]; do
xcrun simctl delete "Flutter-iPhone" || RESULT=1
if [ $RESULT == 0 ]; then
echo -e "Deleted Flutter-iPhone"
fi
done
xcrun simctl create "Flutter-iPhone" "com.apple.CoreSimulator.SimDeviceType.iPhone-14-Pro" "com.apple.CoreSimulator.SimRuntime.iOS-17-2" | xargs xcrun simctl boot
xcrun simctl list
- name: Install patrol_cli
run: flutter pub global activate patrol_cli ${{ matrix.patrol_cli_version }}
- name: Run flutter pub get
run: flutter pub get
- name: Run Integration tests
id: tests_step
working-directory: ${{ matrix.working_directory }}
run: |
patrol test --dart-define=MAPS_API_KEY="$MAPS_API_KEY" --verbose -d 'Flutter-iPhone'
- name: Upload test report
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ios_integration_test_report
path: example/build/ios_results_*.xcresult
retention-days: 5