From 2c6f898f3019fa0c0010d509e09a8b56c276a5a7 Mon Sep 17 00:00:00 2001 From: Albert Ho Date: Tue, 19 Nov 2024 14:35:09 -0800 Subject: [PATCH] re-add cocoapods, cleanup android --- .github/workflows/ios-browserstack.yml | 11 ++++++----- .github/workflows/ios-demos.yml | 3 +++ .github/workflows/ios-perf.yml | 11 ++++++----- .../FalconTestApp/falcon-test-app/build.gradle | 1 - .../java/ai/picovoice/falcon/testapp/BaseTest.java | 13 ------------- .../picovoice/falcon/testapp/IntegrationTest.java | 11 ----------- binding/ios/FalconAppTest/copy_test_resources.sh | 3 --- resources/.lint/spell-check/dict.txt | 2 -- 8 files changed, 15 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ios-browserstack.yml b/.github/workflows/ios-browserstack.yml index 3abf12f..40f1386 100644 --- a/.github/workflows/ios-browserstack.yml +++ b/.github/workflows/ios-browserstack.yml @@ -35,17 +35,18 @@ jobs: - run: pip3 install requests + - name: Install Cocoapods + run: gem install cocoapods + - name: Make build dir run: mkdir ddp - - name: Install resource script dependency - run: | - brew update - brew install convmv - - name: Copy test_resources run: ./copy_test_resources.sh + - name: Run Cocoapods + run: pod install + - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' FalconAppTestUITests/FalconAppTestUITests.swift diff --git a/.github/workflows/ios-demos.yml b/.github/workflows/ios-demos.yml index 87353a4..8c01b4a 100644 --- a/.github/workflows/ios-demos.yml +++ b/.github/workflows/ios-demos.yml @@ -30,6 +30,9 @@ jobs: with: node-version: lts/* + - name: Install Cocoapods + run: gem install cocoapods + - name: Make build dir run: mkdir ddp diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index 9d4f2d2..352857a 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -42,17 +42,18 @@ jobs: - run: pip3 install requests + - name: Install Cocoapods + run: gem install cocoapods + - name: Make build dir run: mkdir ddp - - name: Install resource script dependency - run: | - brew update - brew install convmv - - name: Copy test_resources run: ./copy_test_resources.sh + - name: Run Cocoapods + run: pod install + - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' PerformanceTest/PerformanceTest.swift diff --git a/binding/android/FalconTestApp/falcon-test-app/build.gradle b/binding/android/FalconTestApp/falcon-test-app/build.gradle index 161f923..293f990 100644 --- a/binding/android/FalconTestApp/falcon-test-app/build.gradle +++ b/binding/android/FalconTestApp/falcon-test-app/build.gradle @@ -121,7 +121,6 @@ dependencies { androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - androidTestImplementation('com.microsoft.appcenter:espresso-test-extension:1.4') androidTestImplementation('androidx.test.espresso:espresso-intents:3.5.1') } diff --git a/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/BaseTest.java b/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/BaseTest.java index 97cc0ab..1b58de8 100644 --- a/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/BaseTest.java +++ b/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/BaseTest.java @@ -19,12 +19,7 @@ import androidx.test.platform.app.InstrumentationRegistry; -import com.microsoft.appcenter.espresso.Factory; -import com.microsoft.appcenter.espresso.ReportHelper; - -import org.junit.After; import org.junit.Before; -import org.junit.Rule; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -43,9 +38,6 @@ public class BaseTest { - @Rule - public ReportHelper reportHelper = Factory.getReportHelper(); - Context testContext; Context appContext; AssetManager assetManager; @@ -54,11 +46,6 @@ public class BaseTest { String accessKey; - @After - public void TearDown() { - reportHelper.label("Stopping App"); - } - @Before public void Setup() throws IOException { testContext = InstrumentationRegistry.getInstrumentation().getContext(); diff --git a/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/IntegrationTest.java b/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/IntegrationTest.java index ae560e5..895ee80 100644 --- a/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/IntegrationTest.java +++ b/binding/android/FalconTestApp/falcon-test-app/src/androidTest/java/ai/picovoice/falcon/testapp/IntegrationTest.java @@ -16,9 +16,6 @@ import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; -import com.microsoft.appcenter.espresso.Factory; -import com.microsoft.appcenter.espresso.ReportHelper; - import org.hamcrest.Matcher; import org.junit.After; import org.junit.Before; @@ -74,9 +71,6 @@ public void perform(UiController uiController, View view) { @RunWith(AndroidJUnit4.class) public class IntegrationTest { - @Rule - public ReportHelper reportHelper = Factory.getReportHelper(); - @Rule public ActivityScenarioRule activityScenarioRule = new ActivityScenarioRule<>(MainActivity.class); @@ -91,11 +85,6 @@ public void intentsTeardown() { Intents.release(); } - @After - public void TearDown() { - reportHelper.label("Stopping App"); - } - @Test public void testFalcon() { onView(withId(R.id.testButton)).perform(click()); diff --git a/binding/ios/FalconAppTest/copy_test_resources.sh b/binding/ios/FalconAppTest/copy_test_resources.sh index 13b979c..3253d1f 100755 --- a/binding/ios/FalconAppTest/copy_test_resources.sh +++ b/binding/ios/FalconAppTest/copy_test_resources.sh @@ -11,6 +11,3 @@ cp ${RESOURCE_DIR}/audio_samples/*.wav ${ASSETS_DIR}/audio_samples echo "Copying test data file..." cp ${RESOURCE_DIR}/.test/test_data.json ${ASSETS_DIR} - -echo "Fixing filename encodings for Appcenter compatibility" -convmv --notest -f utf8 -t utf8 --nfd -r ${ASSETS_DIR} diff --git a/resources/.lint/spell-check/dict.txt b/resources/.lint/spell-check/dict.txt index e2afdd5..4506496 100644 --- a/resources/.lint/spell-check/dict.txt +++ b/resources/.lint/spell-check/dict.txt @@ -33,8 +33,6 @@ falcondemo recyclerview constraintlayout gradlew -Appcenter -convmv notest Podfile xcuitest