From 3ae144ed67133ca24da479967351aa9419f61cbb Mon Sep 17 00:00:00 2001 From: Dillon Nys Date: Wed, 6 Mar 2024 14:14:39 -0800 Subject: [PATCH] fix workflow --- .github/workflows/celest_core.yaml | 16 ++++++++++------ .../celest/celest_core/CelestSecureStorage.kt | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/celest_core.yaml b/.github/workflows/celest_core.yaml index f8377096..fe3aedfd 100644 --- a/.github/workflows/celest_core.yaml +++ b/.github/workflows/celest_core.yaml @@ -33,8 +33,8 @@ jobs: run: dart format --set-exit-if-changed . test_darwin: needs: analyze_and_format - runs-on: macos-13-large - timeout-minutes: 10 + runs-on: macos-latest-xlarge + timeout-minutes: 20 steps: - name: Git Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1 @@ -52,9 +52,13 @@ jobs: working-directory: packages/celest_core/example run: flutter pub get - name: Setup iOS Simulator - uses: aws-amplify/amplify-flutter/.github/composite_actions/launch_ios_simulator@main - with: - ios-version: 17 + run: | + RUNTIME=$(xcrun simctl list runtimes | grep 17 | tail -n 1 | cut -d' ' -f 7) + echo "Using runtime: $RUNTIME" + xcrun simctl create ios 'iPhone 15 Pro Max' $RUNTIME + echo "Booting simulator" + xcrun simctl boot ios + echo "Booted simulator" - name: Test (iOS) working-directory: packages/celest_core/example run: flutter test -d test integration_test/secure_storage_test.dart @@ -78,7 +82,7 @@ jobs: working-directory: packages/celest_core/example run: flutter pub get - name: Test (Android) - uses: aws-amplify/amplify-flutter/.github/composite_actions/launch_android_emulator@main + uses: ReactiveCircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # 2.30.1 with: # Matches `package:jni` compileSdkVersion # https://github.com/dart-lang/native/blob/001910c9f40d637cb25c19bb500fb89cebdf7450/pkgs/jni/android/build.gradle#L57C23-L57C25 diff --git a/packages/celest_core/android/src/main/kotlin/dev/celest/celest_core/CelestSecureStorage.kt b/packages/celest_core/android/src/main/kotlin/dev/celest/celest_core/CelestSecureStorage.kt index cb95e425..1aa4a3f4 100644 --- a/packages/celest_core/android/src/main/kotlin/dev/celest/celest_core/CelestSecureStorage.kt +++ b/packages/celest_core/android/src/main/kotlin/dev/celest/celest_core/CelestSecureStorage.kt @@ -38,7 +38,7 @@ class CelestSecureStorage(private val mainActivity: Activity, private val scope: } } - fun read(dataKey: String): String? = sharedPreferences. + fun read(dataKey: String): String? = sharedPreferences.getString(dataKey, null) fun delete(dataKey: String): String? { val current = read(dataKey)