diff --git a/.github/integ-config/detox-integ-all.yml b/.github/integ-config/detox-integ-all.yml index 3debdf83482..750d735f02b 100644 --- a/.github/integ-config/detox-integ-all.yml +++ b/.github/integ-config/detox-integ-all.yml @@ -1,22 +1,23 @@ - test_name: 'integ_rn_ios_storage' working_directory: amplify-js-samples-staging/samples/react-native/storage/StorageApp timeout_minutes: 120 -- test_name: 'integ_rn_ios_storage_multipart_progress' - working_directory: amplify-js-samples-staging/samples/react-native/storage/MultiPartUploadWithProgress - timeout_minutes: 120 -- test_name: 'integ_rn_ios_device_tracking' - working_directory: amplify-js-samples-staging/samples/react-native/auth/deviceTracking - timeout_minutes: 120 -- test_name: 'integ_rn_ios_datastore_sqlite_adapter' - working_directory: amplify-js-samples-staging/samples/react-native/datastore/SQLiteAdapter - timeout_minutes: 120 -- test_name: 'integ_rn_ios_api_gen2_rn_72_detox_cli' - working_directory: amplify-js-samples-staging/samples/react-native/api/gen2/ApiGraphQLGen2 - timeout_minutes: 120 -- test_name: 'integ_rn_ios_api_v6_rn_72_detox_cli' - working_directory: amplify-js-samples-staging/samples/react-native/api/v6/ApiGRAPHQL - timeout_minutes: 120 -- test_name: 'integ_rn_ios_oidc_signout' - working_directory: amplify-js-samples-staging/samples/react-native/auth/HosteduiApp - timeout_minutes: 120 - host_signout_page: true +# - test_name: 'integ_rn_ios_storage_multipart_progress' +# working_directory: amplify-js-samples-staging/samples/react-native/storage/MultiPartUploadWithProgress +# timeout_minutes: 120 +# - test_name: 'integ_rn_ios_device_tracking' +# working_directory: amplify-js-samples-staging/samples/react-native/auth/deviceTracking +# timeout_minutes: 120 +# - test_name: 'integ_rn_ios_datastore_sqlite_adapter' +# working_directory: amplify-js-samples-staging/samples/react-native/datastore/SQLiteAdapter +# timeout_minutes: 120 +# - test_name: 'integ_rn_ios_api_gen2_rn_72_detox_cli' +# working_directory: amplify-js-samples-staging/samples/react-native/api/gen2/ApiGraphQLGen2 +# timeout_minutes: 120 +# - test_name: 'integ_rn_ios_api_v6_rn_72_detox_cli' +# working_directory: amplify-js-samples-staging/samples/react-native/api/v6/ApiGRAPHQL +# timeout_minutes: 120 +# - test_name: 'integ_rn_ios_oidc_signout' +# working_directory: amplify-js-samples-staging/samples/react-native/auth/HosteduiApp +# timeout_minutes: 120 +# host_signout_page: true + \ No newline at end of file diff --git a/.github/workflows/callable-e2e-test-detox.yml b/.github/workflows/callable-e2e-test-detox.yml index ffea13efb6a..b0eed5f3ae4 100644 --- a/.github/workflows/callable-e2e-test-detox.yml +++ b/.github/workflows/callable-e2e-test-detox.yml @@ -25,6 +25,10 @@ jobs: timeout-minutes: ${{ inputs.timeout_minutes }} steps: + - name: Start iOS simulator (background) + run: | + xcrun simctl boot "iPhone 15" & + shell: bash - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: @@ -37,21 +41,38 @@ jobs: GH_TOKEN_STAGING_READ: ${{ secrets.GH_TOKEN_STAGING_READ }} - name: Load Verdaccio with AmplifyJs uses: ./amplify-js/.github/actions/load-verdaccio-with-amplify-js + + - name: Cache node_modules + id: modules-cache + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + with: + path: ./node_modules + key: ${{ inputs.test_name }}-detox-modules-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ inputs.test_name }}-detox-modules- - name: Yarn Install + if: steps.modules-cache.outputs.cache-hit != 'true' working-directory: ${{ inputs.working_directory }} run: | echo "Current NPM registry: " $(yarn config get registry) $GITHUB_WORKSPACE/amplify-js/scripts/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3 shell: bash + + # - name: Cache Pods + # id: pods-cache + # uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + # with: + # path: ios/Pods + # key: ${{ inputs.test_name }}-pods-${{ hashFiles('ios/Podfile.lock') }} + # restore-keys: | + # ${{ inputs.test_name }}-pods- - name: Install CocoaPods + # if: steps.pods-cache.outputs.cache-hit != 'true' run: | cd ios && pod install working-directory: ${{ inputs.working_directory }} shell: bash - - name: Start iOS simulator (background) - run: | - xcrun simctl boot "iPhone 15" & - shell: bash + - name: Start Metro Packager (background) run: | yarn start & @@ -66,7 +87,17 @@ jobs: yarn global add detox-cli working-directory: ${{ inputs.working_directory }} shell: bash + + # - name: Cache Detox build + # id: detox-build-cache + # uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + # with: + # path: ios/build + # key: ${{ inputs.test_name }}-detox-build-${{ hashFiles('yarn.lock', 'ios/Podfile.lock', 'node_modules/.yarn-integrity', 'ios/Pods/Manifest.lock') }} + # restore-keys: | + # ${{ inputs.test_name }}-detox-build- - name: Detox Build + # if: steps.detox-build-cache.outputs.cache-hit != 'true' || steps.modules-cache.outputs.cache-hit != 'true' || steps.pods-cache.outputs.cache-hit != 'true' run: | detox build -c ios.sim.debug env: @@ -74,6 +105,7 @@ jobs: JEST_JUNIT_OUTPUT_NAME: detox-test-results.xml working-directory: ${{ inputs.working_directory }} shell: bash + - name: Start the http-server and host the oidc signout page locally (background). if: ${{ inputs.host_signout_page }} run: yarn host:signout diff --git a/.github/workflows/callable-e2e-tests.yml b/.github/workflows/callable-e2e-tests.yml index 2dc95a286bf..96aca48f5da 100644 --- a/.github/workflows/callable-e2e-tests.yml +++ b/.github/workflows/callable-e2e-tests.yml @@ -23,29 +23,29 @@ jobs: integ-config-headless: ${{ steps.load_config.outputs.INTEG_CONFIG_HEADLESS }} detox-integ-config: ${{ steps.load_config.outputs.DETOX_INTEG_CONFIG }} - e2e-test-runner: - name: E2E test runnner - needs: e2e-prep - secrets: inherit - strategy: - matrix: - integ-config: ${{ fromJson(needs.e2e-prep.outputs.integ-config) }} - fail-fast: false - uses: ./.github/workflows/callable-e2e-test.yml - with: - test_name: ${{ matrix.integ-config.test_name }} - framework: ${{ matrix.integ-config.framework }} - category: ${{ matrix.integ-config.category }} - spec: ${{ matrix.integ-config.spec || '' }} - amplifyjs_dir: ${{ matrix.integ-config.amplifyjs_dir || false }} - sample_name: ${{ toJSON(matrix.integ-config.sample_name) || '[""]' }} - browser: ${{ toJSON(matrix.integ-config.browser) || '[""]' }} - backend: ${{ matrix.integ-config.backend }} - timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 35 }} - retry_count: ${{ matrix.integ-config.retry_count || 3 }} - yarn_script: ${{ matrix.integ-config.yarn_script || '' }} - yarn_script_args: ${{ matrix.integ-config.yarn_script_args || '15' }} - env: ${{ matrix.integ-config.env && toJSON(matrix.integ-config.env) || '{}' }} +# e2e-test-runner: +# name: E2E test runnner +# needs: e2e-prep +# secrets: inherit +# strategy: +# matrix: +# integ-config: ${{ fromJson(needs.e2e-prep.outputs.integ-config) }} +# fail-fast: false +# uses: ./.github/workflows/callable-e2e-test.yml +# with: +# test_name: ${{ matrix.integ-config.test_name }} +# framework: ${{ matrix.integ-config.framework }} +# category: ${{ matrix.integ-config.category }} +# spec: ${{ matrix.integ-config.spec || '' }} +# amplifyjs_dir: ${{ matrix.integ-config.amplifyjs_dir || false }} +# sample_name: ${{ toJSON(matrix.integ-config.sample_name) || '[""]' }} +# browser: ${{ toJSON(matrix.integ-config.browser) || '[""]' }} +# backend: ${{ matrix.integ-config.backend }} +# timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 35 }} +# retry_count: ${{ matrix.integ-config.retry_count || 3 }} +# yarn_script: ${{ matrix.integ-config.yarn_script || '' }} +# yarn_script_args: ${{ matrix.integ-config.yarn_script_args || 15 }} +# env: ${{ matrix.integ-config.env && toJSON(matrix.integ-config.env) || '{}' }} # e2e-test-runner-headless: # name: E2E test runnner_headless