Skip to content

Commit

Permalink
Update Build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mrajatttt authored May 30, 2024
1 parent 063de33 commit e858f99
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ jobs:
- name: Debug - List root directory contents
run: ls -al

- name: Set working directory to AmazonConnectChatIOS
run: echo "::set-output name=workdir::${{ github.workspace }}/AmazonConnectChatIOS"
- name: Set working directory
id: set_workdir
run: echo "WORKDIR=${{ github.workspace }}/AmazonConnectChatIOS" >> $GITHUB_ENV

- name: Debug - List AmazonConnectChatIOS directory contents
run: ls -al ${{ steps.set_working_directory.outputs.workdir }}
run: ls -al ${{ env.WORKDIR }}

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
Expand All @@ -48,8 +49,8 @@ jobs:
run: sudo gem install cocoapods

- name: Install Pods
working-directory: ${{ steps.set_working_directory.outputs.workdir }}
run: pod install
working-directory: ${{ env.WORKDIR }}

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -70,13 +71,13 @@ jobs:
run: ls -al

- name: Clean and Build SDK
working-directory: ${{ steps.set_working_directory.outputs.workdir }}
run: |
xcodebuild clean -workspace AmazonConnectChatIOS.xcworkspace \
-scheme AmazonConnectChatIOS \
-sdk iphonesimulator \
-configuration Debug \
build
working-directory: ${{ env.WORKDIR }}

test:
runs-on: macos-latest
Expand All @@ -89,7 +90,6 @@ jobs:
run: ls -al

- name: Run Unit Tests
working-directory: ${{ steps.set_working_directory.outputs.workdir }}
run: |
xcodebuild test -workspace AmazonConnectChatIOS.xcworkspace \
-scheme AmazonConnectChatIOS \
Expand All @@ -101,9 +101,10 @@ jobs:
TEST_RESULT=${PIPESTATUS[0]}
if [ $TEST_RESULT -ne 0 ]; then
echo "xcodebuild test failed with exit code $TEST_RESULT"
working-directory: ${{ env.WORKDIR }}
continue-on-error: true

- name: Print Test Results
if: always()
working-directory: ${{ steps.set_working_directory.outputs.workdir }}
run: cat raw-test-output.log
working-directory: ${{ env.WORKDIR }}

0 comments on commit e858f99

Please sign in to comment.