1
- name : ' iOS end to end tests action'
2
- description : ' Prepares and runs end to end tests on iOS device'
1
+ name : ' Build iOS end to end tests action'
2
+ description : ' Prepares and builds end to end tests on iOS device'
3
3
inputs :
4
4
ios_device_pin_code :
5
5
description : ' iOS Device Pin Code'
@@ -16,25 +16,19 @@ inputs:
16
16
test_device_udid :
17
17
description : ' Test Device UDID'
18
18
required : true
19
- xcode_test_plan :
20
- description : ' Xcode Test Plan to run'
21
- required : true
22
19
partner_api_token :
23
20
description : ' Partner API Token'
24
21
required : true
25
22
test_name :
26
23
description : ' Test case/suite name. Will run all tests in the test plan if not provided.'
27
24
required : false
25
+ outputs_path :
26
+ description : ' Path to store outputs. This should be unique for each job run in order to avoid concurrency issues.'
27
+ required : true
28
28
29
29
runs :
30
30
using : ' composite'
31
31
steps :
32
- - name : Make sure app is not installed
33
- run : ios-deploy --id $IOS_TEST_DEVICE_UDID --uninstall_only --bundle_id net.mullvad.MullvadVPN
34
- shell : bash
35
- env :
36
- IOS_TEST_DEVICE_UDID : ${{ inputs.test_device_udid }}
37
-
38
32
- name : Configure Xcode project
39
33
run : |
40
34
for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done
@@ -46,12 +40,21 @@ runs:
46
40
sed -i "" \
47
41
"/TEST_DEVICE_IDENTIFIER_UUID =/ s/= .*/= $TEST_DEVICE_IDENTIFIER_UUID/" \
48
42
UITests.xcconfig
43
+ sed -i "" \
44
+ "s#^// PARTNER_API_TOKEN =#PARTNER_API_TOKEN =#" \
45
+ UITests.xcconfig
49
46
sed -i "" \
50
47
"/PARTNER_API_TOKEN =/ s#= .*#= $PARTNER_API_TOKEN#" \
51
48
UITests.xcconfig
52
49
sed -i "" \
53
50
"/ATTACH_APP_LOGS_ON_FAILURE =/ s#= .*#= 1#" \
54
51
UITests.xcconfig
52
+ sed -i "" \
53
+ "/TEST_DEVICE_IS_IPAD =/ s#= .*#= 0#" \
54
+ UITests.xcconfig
55
+ sed -i "" \
56
+ "/UNINSTALL_APP_IN_TEST_SUITE_TEAR_DOWN =/ s#= .*#= 0#" \
57
+ UITests.xcconfig
55
58
shell : bash
56
59
working-directory : ios/Configurations
57
60
env :
61
64
NO_TIME_ACCOUNT_NUMBER : ${{ inputs.no_time_account_number }}
62
65
PARTNER_API_TOKEN : ${{ inputs.partner_api_token }}
63
66
64
- - name : Run end-to-end- tests
67
+ - name : Build app and tests for testing
65
68
run : |
66
69
if [ -n "$TEST_NAME" ]; then
67
70
TEST_NAME_ARGUMENT=" -only-testing $TEST_NAME"
@@ -71,19 +74,12 @@ runs:
71
74
set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
72
75
-project MullvadVPN.xcodeproj \
73
76
-scheme MullvadVPNUITests \
74
- -testPlan $XCODE_TEST_PLAN $TEST_NAME_ARGUMENT \
75
- -resultBundlePath xcode-test-report \
77
+ -testPlan MullvadVPNUITestsAll $TEST_NAME_ARGUMENT \
76
78
-destination "platform=iOS,id=$TEST_DEVICE_UDID" \
77
- clean test 2>&1 | xcbeautify --report junit --report-path junit-test-report
79
+ -derivedDataPath derived-data \
80
+ clean build-for-testing 2>&1
78
81
shell : bash
79
82
working-directory : ios/
80
83
env :
81
- XCODE_TEST_PLAN : ${{ inputs.xcode_test_plan }}
82
84
TEST_DEVICE_UDID : ${{ inputs.test_device_udid }}
83
85
TEST_NAME : ${{ inputs.test_name }}
84
-
85
- - name : Uninstall app if still installed
86
- run : ios-deploy --id $IOS_TEST_DEVICE_UDID --uninstall_only --bundle_id net.mullvad.MullvadVPN
87
- shell : bash
88
- env :
89
- IOS_TEST_DEVICE_UDID : ${{ inputs.test_device_udid }}
0 commit comments