diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c98d46..4237dfd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ executors: resource_class: m4pro.medium jobs: - test-android: + test-rn-webcrypto-android: executor: name: android/android_machine resource_class: large @@ -52,7 +52,7 @@ jobs: path: packages/react-native-webcrypto-bridge/android/build/reports destination: android-test-reports - test-ios: + test-rn-webcrypto-ios: executor: macos steps: - checkout @@ -80,9 +80,71 @@ jobs: path: packages/react-native-webcrypto-bridge/ios/.build destination: ios-build-artifacts + test-rn-platform-android: + executor: + name: android/android_machine + resource_class: large + tag: default + steps: + - checkout + + - restore_cache: + keys: + - gradle-rn-platform-{{ checksum "packages/react-native-platform/android/build.gradle" }} + - gradle-rn-platform- + + - run: + name: Run React Native Platform Android Tests + command: | + cd packages/react-native-platform/android + ./gradlew testDebugUnitTest --info + + - save_cache: + key: gradle-rn-platform-{{ checksum "packages/react-native-platform/android/build.gradle" }} + paths: + - ~/.gradle + - .gradle + + - store_test_results: + path: packages/react-native-platform/android/build/test-results + + - store_artifacts: + path: packages/react-native-platform/android/build/reports + destination: react-native-platform-android-test-reports + + test-rn-platform-ios: + executor: macos + steps: + - checkout + + - restore_cache: + keys: + - swift-spm-rn-platform-{{ checksum "packages/react-native-platform/ios/Package.swift" }} + - swift-spm-rn-platform- + + - run: + name: Run React Native Platform iOS Tests + command: | + cd packages/react-native-platform/ios + swift test --verbose + + - save_cache: + key: swift-spm-rn-platform-{{ checksum "packages/react-native-platform/ios/Package.swift" }} + paths: + - packages/react-native-platform/ios/.build + + - store_test_results: + path: packages/react-native-platform/ios/.build/test-results + + - store_artifacts: + path: packages/react-native-platform/ios/.build + destination: react-native-platform-ios-build-artifacts + workflows: version: 2 build_and_test: jobs: - - test-android - - test-ios + - test-rn-webcrypto-android + - test-rn-webcrypto-ios + - test-rn-platform-android + - test-rn-platform-ios diff --git a/e2e/apps/react-native-oidc/app.config.ts b/e2e/apps/react-native-oidc/app.config.ts index 7509c40..2c4f6b7 100644 --- a/e2e/apps/react-native-oidc/app.config.ts +++ b/e2e/apps/react-native-oidc/app.config.ts @@ -18,6 +18,7 @@ export default ({ config }: ConfigContext) => ({ extra: { env }, + newArchEnabled: true, "android": { "package": "com.anonymous.reporeactnativeoidc" }, diff --git a/e2e/apps/react-native-oidc/app/(login)/_layout.tsx b/e2e/apps/react-native-oidc/app/(login)/_layout.tsx deleted file mode 100644 index aa7f199..0000000 --- a/e2e/apps/react-native-oidc/app/(login)/_layout.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { Tabs } from 'expo-router'; -import React from 'react'; -import { Platform } from 'react-native'; - -import { HapticTab } from '@/components/HapticTab'; -import { IconSymbol } from '@/components/ui/IconSymbol'; -import TabBarBackground from '@/components/ui/TabBarBackground'; -import { Colors } from '@/constants/Colors'; -import { useColorScheme } from '@/hooks/useColorScheme'; - -export default function TabLayout() { - const colorScheme = useColorScheme(); - - return ( - - , - }} - /> - , - }} - /> - - ); -} diff --git a/e2e/apps/react-native-oidc/app/(login)/index.tsx b/e2e/apps/react-native-oidc/app/(login)/index.tsx deleted file mode 100644 index e3fd92d..0000000 --- a/e2e/apps/react-native-oidc/app/(login)/index.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import { useCallback, useEffect, useState } from 'react'; -import { StyleSheet, Button } from 'react-native'; -import { Image } from 'expo-image'; -import Constants from 'expo-constants'; -import { useAuth } from '@/hooks/useAuth'; - -import ParallaxScrollView from '@/components/ParallaxScrollView'; -import { ThemedText } from '@/components/ThemedText'; -import { ThemedView } from '@/components/ThemedView'; -import { HelloWave } from '@/components/HelloWave'; - - -export default function LoginScreen () { - const { signIn } = useAuth(); - const [ authError, setAuthError ] = useState(null); - - const signInFunc = useCallback(async () => { - try { - await signIn('/(login)/token'); - } - catch (err) { - setAuthError(err as Error); - } - }, [signIn, setAuthError]); - - useEffect(() => { - (async () => { - await signInFunc(); - })(); - }, [signInFunc]); - - let view = ( - <> - Loading... - - - ); - - if (authError) { - view = ( - <> - Error - {authError.message} -