Skip to content

Commit

Permalink
Update e-2-e test
Browse files Browse the repository at this point in the history
  • Loading branch information
mojganii committed Oct 24, 2024
1 parent 72bafbd commit 7e2eb18
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions .github/actions/build-ios-e2e-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,43 @@ runs:
id: set-working-directory
run: |
if [ -z "${{ inputs.base_directory }}" ]; then
echo "Setting base_directory to default '.'"
echo "base_directory=." >> $GITHUB_ENV
else
echo "Setting base_directory to provided value: ${{ inputs.base_directory }}"
echo "base_directory=${{ inputs.base_directory }}" >> $GITHUB_ENV
fi
shell: bash

- name: Configure Xcode project
run: >
for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done
sed -i "" "/^HAS_TIME_ACCOUNT_NUMBER/d" UITests.xcconfig
sed -i "" "/^NO_TIME_ACCOUNT_NUMBER/d" UITests.xcconfig
sed -i "" \
"/IOS_DEVICE_PIN_CODE =/ s/= .*/= $IOS_DEVICE_PIN_CODE/" \
UITests.xcconfig
sed -i "" \
"/TEST_DEVICE_IDENTIFIER_UUID =/ s/= .*/= $TEST_DEVICE_IDENTIFIER_UUID/" \
UITests.xcconfig
sed -i "" \
"s#^// PARTNER_API_TOKEN =#PARTNER_API_TOKEN =#" \
UITests.xcconfig
sed -i "" \
"/PARTNER_API_TOKEN =/ s#= .*#= $PARTNER_API_TOKEN#" \
UITests.xcconfig
sed -i "" \
"/ATTACH_APP_LOGS_ON_FAILURE =/ s#= .*#= 1#" \
UITests.xcconfig
sed -i "" \
"/TEST_DEVICE_IS_IPAD =/ s#= .*#= 0#" \
UITests.xcconfig
sed -i "" \
"/UNINSTALL_APP_IN_TEST_SUITE_TEAR_DOWN =/ s#= .*#= 0#" \
UITests.xcconfig
run: |
echo "Configuring Xcode project in directory: ${{ env.base_directory }}/ios/Configurations"
for file in *.xcconfig.template; do
cp $file ${file//.template/};
done
sed -i "" "/^HAS_TIME_ACCOUNT_NUMBER/d" UITests.xcconfig
sed -i "" "/^NO_TIME_ACCOUNT_NUMBER/d" UITests.xcconfig
sed -i "" \
"/IOS_DEVICE_PIN_CODE =/ s/= .*/= $IOS_DEVICE_PIN_CODE/" \
UITests.xcconfig
sed -i "" \
"/TEST_DEVICE_IDENTIFIER_UUID =/ s/= .*/= $TEST_DEVICE_IDENTIFIER_UUID/" \
UITests.xcconfig
sed -i "" \
"s#^// PARTNER_API_TOKEN =#PARTNER_API_TOKEN =#" \
UITests.xcconfig
sed -i "" \
"/PARTNER_API_TOKEN =/ s#= .*#= $PARTNER_API_TOKEN#" \
UITests.xcconfig
sed -i "" \
"/ATTACH_APP_LOGS_ON_FAILURE =/ s#= .*#= 1#" \
UITests.xcconfig
sed -i "" \
"/TEST_DEVICE_IS_IPAD =/ s#= .*#= 0#" \
UITests.xcconfig
sed -i "" \
"/UNINSTALL_APP_IN_TEST_SUITE_TEAR_DOWN =/ s#= .*#= 0#" \
UITests.xcconfig
shell: bash
working-directory: ${{ env.base_directory }}/ios/Configurations
env:
Expand All @@ -81,6 +86,7 @@ runs:

- name: Build app and tests for testing
run: |
echo "Building app and tests in directory: ${{ env.base_directory }}/ios"
if [ -n "$TEST_NAME" ]; then
TEST_NAME_ARGUMENT=" -only-testing $TEST_NAME"
else
Expand Down

0 comments on commit 7e2eb18

Please sign in to comment.