diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml
index 22daa2be7a..afa23ddb4c 100644
--- a/.github/workflows/integration_tests.yml
+++ b/.github/workflows/integration_tests.yml
@@ -284,20 +284,13 @@ jobs:
         with:
           ref: ${{needs.check_and_prepare.outputs.github_ref}}
           submodules: true
-      - name: Setup python
-        uses: actions/setup-python@v4
+      - name: Setup Env
+        uses: ./gha/setup_env
         with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install Desktop SDK & integration tests prerequisites
-        uses: nick-invision/retry@v2
-        with:
-          shell: bash
-          timeout_minutes: 15
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p Desktop -a '${{ matrix.arch }}' -s '${{ matrix.ssl_variant }}'
-      - name: Add msbuild to PATH (Windows)
-        if: startsWith(matrix.os, 'windows')
-        uses: microsoft/setup-msbuild@v1.1
+          os: ${{ matrix.os }}
+          platform: 'Desktop'
+          arch: ${{ matrix.arch }}
+          ssl_variant: ${{ matrix.ssl_variant }}
       - name: Cache vcpkg C++ dependencies
         id: cache_vcpkg
         uses: actions/cache@v3
@@ -416,26 +409,17 @@ jobs:
         with:
           ref: ${{needs.check_and_prepare.outputs.github_ref}}
           submodules: true
-      - name: Add msbuild to PATH (Windows)
-        if: startsWith(matrix.os, 'windows')
-        uses: microsoft/setup-msbuild@v1.1
+      - name: Setup Env
+        uses: ./gha/setup_env
+        with:
+          os: ${{ matrix.os }}
+          platform: 'Android'
       - name: Cache NDK
         id: cache_ndk
         uses: actions/cache@v3
         with:
           path: /tmp/android-ndk-r21e
           key: android-ndk-${{ matrix.os }}-r21e
-      - name: Setup python
-        uses: actions/setup-python@v4
-        with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install Android SDK & integration tests prerequisites
-        uses: nick-invision/retry@v2
-        with:
-          shell: bash
-          timeout_minutes: 10
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p Android
       - name: Fetch prebuilt packaged SDK from previous run
         uses: dawidd6/action-download-artifact@v2
         if: ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -524,16 +508,10 @@ jobs:
         with:
           ref: ${{needs.check_and_prepare.outputs.github_ref}}
           submodules: true
-      - name: Setup python
-        uses: actions/setup-python@v4
-        with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install iOS SDK & integration tests prerequisites
-        uses: nick-invision/retry@v2
+      - name: Setup Env
+        uses: ./gha/setup_env
         with:
-          timeout_minutes: 3
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p iOS
+          platform: 'iOS'
       - name: Fetch prebuilt packaged SDK from previous run
         uses: dawidd6/action-download-artifact@v2
         if: ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -623,16 +601,10 @@ jobs:
         with:
           ref: ${{needs.check_and_prepare.outputs.github_ref}}
           submodules: true
-      - name: Setup python
-        uses: actions/setup-python@v4
+      - name: Setup Env
+        uses: ./gha/setup_env
         with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install tvOS SDK & integration tests prerequisites
-        uses: nick-invision/retry@v2
-        with:
-          timeout_minutes: 3
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p tvOS
+          platform: 'tvOS'
       - name: Fetch prebuilt packaged SDK from previous run
         uses: dawidd6/action-download-artifact@v2
         if: ${{ github.event.inputs.test_packaged_sdk != '' }}
@@ -751,17 +723,14 @@ jobs:
         with:
           path: testapps/testapps-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}
           name: testapps-desktop-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ssl_variant }}
-      - name: Setup python
-        uses: actions/setup-python@v4
-        with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install prerequisites for testing
-        uses: nick-invision/retry@v2
-        with:
-          shell: bash
-          timeout_minutes: 15
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p Desktop -t true -a '${{ matrix.arch }}' -s '${{ matrix.ssl_variant }}'
+      - name: Setup Env
+        uses: ./gha/setup_env
+        with:
+          os: ${{ matrix.os }}
+          platform: 'Desktop'
+          arch: ${{ matrix.arch }}
+          ssl_variant: ${{ matrix.ssl_variant }}
+          test: 'true'
       - name: Set up Node (16)
         uses: actions/setup-node@v3
         with:
@@ -1005,17 +974,11 @@ jobs:
         with:
           path: testapps/testapps-android-${{ matrix.build_os }}
           name: testapps-android-${{ matrix.build_os }}
-      - name: Setup python
-        uses: actions/setup-python@v4
+      - name: Setup Env
+        uses: ./gha/setup_env
         with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install prerequisites for testing
-        uses: nick-invision/retry@v2
-        with:
-          shell: bash
-          timeout_minutes: 5
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p Android -t true
+          platform: 'Android'
+          test: 'true'
       - name: Get Device Info
         id: device-info
         run: |
@@ -1133,16 +1096,11 @@ jobs:
         with:
           path: testapps/testapps-ios-${{ matrix.build_os }}
           name: testapps-ios-${{ matrix.build_os }}
-      - name: Setup python
-        uses: actions/setup-python@v4
-        with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install prerequisites for testing
-        uses: nick-invision/retry@v2
+      - name: Setup Env
+        uses: ./gha/setup_env
         with:
-          timeout_minutes: 3
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p iOS -t true
+          platform: 'iOS'
+          test: 'true'
       - name: Device Info
         id: device-info
         run: |
@@ -1261,16 +1219,11 @@ jobs:
         with:
           path: testapps/testapps-tvos-${{ matrix.build_os }}
           name: testapps-tvos-${{ matrix.build_os }}
-      - name: Setup python
-        uses: actions/setup-python@v4
+      - name: Setup Env
+        uses: ./gha/setup_env
         with:
-          python-version: ${{ env.pythonVersion }}
-      - name: Install prerequisites for testing
-        uses: nick-invision/retry@v2
-        with:
-          timeout_minutes: 3
-          max_attempts: 3
-          command: scripts/gha/install_test_workflow_prereqs.sh -p tvOS  -t true
+          platform: 'tvOS'
+          test: 'true'
       - name: Setup java for Firestore emulator
         uses: actions/setup-java@v3
         with:
diff --git a/gha/setup_env/action.yml b/gha/setup_env/action.yml
new file mode 100644
index 0000000000..5b40ef7186
--- /dev/null
+++ b/gha/setup_env/action.yml
@@ -0,0 +1,44 @@
+# 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
+#
+#     http://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: 'Unity Setup'
+inputs:
+  os:
+    required: false
+  platform:
+    required: true
+  arch:
+    required: false
+  ssl_variant:
+    required: false
+  test:
+    required: false
+
+runs:
+  using: 'composite'
+  steps:
+    - name: Setup python
+      uses: actions/setup-python@v4
+      with:
+        python-version: ${{ env.pythonVersion }}
+    - name: Add msbuild to PATH (Windows)
+      if: startsWith(inputs.os, 'windows')
+      uses: microsoft/setup-msbuild@v1.1
+    - name: Install Desktop SDK & integration tests prerequisites
+      uses: nick-invision/retry@v2
+      with:
+        shell: bash
+        timeout_minutes: 15
+        max_attempts: 3
+        command: scripts/gha/install_test_workflow_prereqs.sh -p ${{ inputs.platform }} -a '${{ inputs.arch }}' -s '${{ inputs.ssl_variant }}' -t '${{ inputs.test }}'