From c82f73d199aa99c988175274a00fc2dc877fe6ca Mon Sep 17 00:00:00 2001 From: Muhammad Umer Date: Thu, 17 Aug 2023 10:13:42 +0100 Subject: [PATCH] chore: test --- .github/workflows/edXTestSuit.yml | 83 +++++++++++++++++-------------- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/.github/workflows/edXTestSuit.yml b/.github/workflows/edXTestSuit.yml index 96784f4aa..2531b5943 100644 --- a/.github/workflows/edXTestSuit.yml +++ b/.github/workflows/edXTestSuit.yml @@ -7,39 +7,39 @@ on: - master jobs: - xcode-14: - name: "${{ matrix.env.name }}" - runs-on: macos-13 - strategy: - fail-fast: false - matrix: - env: - - name: "Test iOS 16" - runtime: "iOS-16-4" - device: "iPhone 14 Pro" - task: "testLTRCurrentOS" - - name: "Test RTL iOS 16" - runtime: "iOS-16-4" - device: "iPhone 14 Pro" - task: "testRTLCurrentOS" - steps: - - name: "Select Xcode 14.3.1" - run: | - sudo xcode-select -s /Applications/Xcode_14.3.1.app - - name: Git checkout - uses: actions/checkout@v2 - - name: Run tests - if: always() - run: | - TASK="${{ matrix.env.task }}" - RUNTIME="${{ matrix.env.runtime }}" - DEVICE="${{ matrix.env.device }}" - DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") - RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") - DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID) - xcrun simctl boot $DESTINATION_ID - ./gradlew -q $TASK | xcpretty -c - shell: bash + # xcode-14: + # name: "${{ matrix.env.name }}" + # runs-on: macos-13 + # strategy: + # fail-fast: false + # matrix: + # env: + # - name: "Test iOS 16" + # runtime: "iOS-16-4" + # device: "iPhone 14 Pro" + # task: "testLTRCurrentOS" + # - name: "Test RTL iOS 16" + # runtime: "iOS-16-4" + # device: "iPhone 14 Pro" + # task: "testRTLCurrentOS" + # steps: + # - name: "Select Xcode 14.3.1" + # run: | + # sudo xcode-select -s /Applications/Xcode_14.3.1.app + # - name: Git checkout + # uses: actions/checkout@v2 + # - name: Run tests + # if: always() + # run: | + # TASK="${{ matrix.env.task }}" + # RUNTIME="${{ matrix.env.runtime }}" + # DEVICE="${{ matrix.env.device }}" + # DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") + # RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") + # DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID) + # xcrun simctl boot $DESTINATION_ID + # ./gradlew -q $TASK | xcpretty -c + # shell: bash xcode-13: name: "${{ matrix.env.name }}" @@ -63,16 +63,25 @@ jobs: xcrun simctl list runtimes - name: Git checkout uses: actions/checkout@v2 - - name: Run tests - if: always() + - name: Calculate DESTINATION_ID + id: destination-id run: | - xcrun simctl list devices TASK="${{ matrix.env.task }}" RUNTIME="${{ matrix.env.runtime }}" DEVICE="${{ matrix.env.device }}" DEVICE_ID=com.apple.CoreSimulator.SimDeviceType.$(echo $DEVICE | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") RUNTIME_ID=com.apple.CoreSimulator.SimRuntime.$(echo $RUNTIME | sed -E -e "s/[ \\-]+/ /g" -e "s/[^[:alnum:]]/-/g") DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID) + echo DESTINATION_ID + echo "DESTINATION_ID=${DESTINATION_ID}" >> $GITHUB_ENV + - name: Display DESTINATION_ID + run: | + echo "DESTINATION_ID: $DESTINATION_ID" + - name: Boot simulator + run: | xcrun simctl boot $DESTINATION_ID + - name: Run tests + if: always() + run: | ./gradlew -q $TASK | xcpretty -c - shell: bash \ No newline at end of file + shell: bash \ No newline at end of file