diff options
| author | Niklas Berglund <niklas.berglund@gmail.com> | 2024-03-25 14:54:24 +0100 |
|---|---|---|
| committer | Niklas Berglund <niklas.berglund@gmail.com> | 2024-04-04 18:03:25 +0200 |
| commit | 6b07ad3fb68a32b250df2f628d3df02afc1f4b83 (patch) | |
| tree | 78aa788e64a0086564ef5ab7b911c4cdb90e55f5 /.github/actions | |
| parent | 7170e05df5cbfd4dd3f372267bd9c155ed49f5f6 (diff) | |
| download | mullvadvpn-6b07ad3fb68a32b250df2f628d3df02afc1f4b83.tar.xz mullvadvpn-6b07ad3fb68a32b250df2f628d3df02afc1f4b83.zip | |
Add settings migration tests for iOS
Diffstat (limited to '.github/actions')
| -rw-r--r-- | .github/actions/ios-end-to-end-tests/action.yml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/.github/actions/ios-end-to-end-tests/action.yml b/.github/actions/ios-end-to-end-tests/action.yml new file mode 100644 index 0000000000..9d771d151c --- /dev/null +++ b/.github/actions/ios-end-to-end-tests/action.yml @@ -0,0 +1,59 @@ +name: 'iOS end to end tests action' +description: 'Prepares and runs end to end tests on iOS device' +inputs: + ios_device_pin_code: + description: 'iOS Device Pin Code' + required: true + test_device_identifier_uuid: + description: 'Test Device Identifier UUID' + required: true + has_time_account_number: + description: 'Has Time Account Number' + required: true + no_time_account_number: + description: 'No Time Account Number' + required: true + test_device_udid: + description: 'Test Device UDID' + required: true + xcode_test_plan: + description: 'Xcode Test Plan to run' + required: true + +runs: + using: 'composite' + steps: + - 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 + echo -e "\nHAS_TIME_ACCOUNT_NUMBER = $HAS_TIME_ACCOUNT_NUMBER" >> UITests.xcconfig + echo "NO_TIME_ACCOUNT_NUMBER = $NO_TIME_ACCOUNT_NUMBER" >> UITests.xcconfig + shell: bash + working-directory: ios/Configurations + env: + IOS_DEVICE_PIN_CODE: ${{ inputs.ios_device_pin_code }} + TEST_DEVICE_IDENTIFIER_UUID: ${{ inputs.test_device_identifier_uuid }} + HAS_TIME_ACCOUNT_NUMBER: ${{ inputs.has_time_account_number }} + NO_TIME_ACCOUNT_NUMBER: ${{ inputs.no_time_account_number }} + + - name: Run end-to-end-tests + run: | + set -o pipefail && env NSUnbufferedIO=YES xcodebuild \ + -project MullvadVPN.xcodeproj \ + -scheme MullvadVPNUITests \ + -testPlan $XCODE_TEST_PLAN \ + -destination "platform=iOS,id=$TEST_DEVICE_UDID" \ + clean test 2>&1 | xcbeautify --report junit --report-path test-report + shell: bash + working-directory: ios/ + env: + XCODE_TEST_PLAN: ${{ inputs.xcode_test_plan }} + TEST_DEVICE_UDID: ${{ inputs.test_device_udid }} |
