-
Notifications
You must be signed in to change notification settings - Fork 339
126 lines (113 loc) · 5.11 KB
/
ios-end-to-end-tests-settings-migration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
name: iOS settings migration tests
concurrency:
group: ios-end-to-end-tests
cancel-in-progress: false
permissions:
contents: read
on:
workflow_dispatch:
schedule:
# At midnight every day.
# Notifications for scheduled workflows are sent to the user who last modified the cron
# syntax in the workflow file. If you update this you must have notifications for
# Github Actions enabled, so these don't go unnoticed.
# https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs
- cron: '0 0 * * *'
env:
TEST_DEVICE_UDID: 00008130-0019181022F3803A
jobs:
test:
name: Settings migration end to end tests
runs-on: [self-hosted, macOS, ios-test]
env:
OLD_APP_COMMIT_HASH: 895b7d98825e678f5d7023d5ea3c9b7beee89280
steps:
- name: Configure Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
override: true
target: aarch64-apple-ios
- name: Uninstall app
timeout-minutes: 5
run: ios-deploy --id ${{ env.TEST_DEVICE_UDID }} --uninstall_only --bundle_id net.mullvad.MullvadVPN
- name: Checkout old repository version
uses: actions/checkout@v4
with:
ref: ${{ env.OLD_APP_COMMIT_HASH }}
- name: Change DNS settings on old app version
uses: ./.github/actions/ios-end-to-end-tests
with:
ios_device_pin_code: ${{ secrets.IOS_DEVICE_PIN_CODE }}
test_device_identifier_uuid: ${{ secrets.IOS_TEST_DEVICE_IDENTIFIER_UUID }}
has_time_account_number: ${{ secrets.IOS_HAS_TIME_ACCOUNT_NUMBER_PRODUCTION }}
no_time_account_number: ${{ secrets.IOS_NO_TIME_ACCOUNT_NUMBER_PRODUCTION }}
test_device_udid: ${{ env.TEST_DEVICE_UDID }}
xcode_test_plan: 'MullvadVPNUITestsChangeDNSSettings'
partner_api_token: ${{ secrets.STAGEMOLE_PARTNER_AUTH }}
- name: Store test report for changing DNS settings
uses: actions/upload-artifact@v4
if: always()
with:
name: test-report-change-dns-settings
path: ios/test-report/junit.xml
- name: Checkout repository to get the current app version
uses: actions/checkout@v4
- name: Verify DNS settings still changed on current app version
uses: ./.github/actions/ios-end-to-end-tests
if: always()
with:
ios_device_pin_code: ${{ secrets.IOS_DEVICE_PIN_CODE }}
test_device_identifier_uuid: ${{ secrets.IOS_TEST_DEVICE_IDENTIFIER_UUID }}
has_time_account_number: ${{ secrets.IOS_HAS_TIME_ACCOUNT_NUMBER_PRODUCTION }}
no_time_account_number: ${{ secrets.IOS_NO_TIME_ACCOUNT_NUMBER_PRODUCTION }}
test_device_udid: ${{ env.TEST_DEVICE_UDID }}
partner_api_token: ${{ secrets.STAGEMOLE_PARTNER_AUTH }}
xcode_test_plan: 'MullvadVPNUITestsVerifyDNSSettingsChanged'
- name: Store test report for verifying DNS settings
uses: actions/upload-artifact@v4
if: always()
with:
name: test-report-verify-dns-settings
path: ios/test-report/junit.xml
- name: Checkout old repository version
uses: actions/checkout@v4
with:
ref: ${{ env.OLD_APP_COMMIT_HASH }}
- name: Change all other settings on old app version
uses: ./.github/actions/ios-end-to-end-tests
if: always()
with:
ios_device_pin_code: ${{ secrets.IOS_DEVICE_PIN_CODE }}
test_device_identifier_uuid: ${{ secrets.IOS_TEST_DEVICE_IDENTIFIER_UUID }}
has_time_account_number: ${{ secrets.IOS_HAS_TIME_ACCOUNT_NUMBER_PRODUCTION }}
no_time_account_number: ${{ secrets.IOS_NO_TIME_ACCOUNT_NUMBER_PRODUCTION }}
test_device_udid: ${{ env.TEST_DEVICE_UDID }}
partner_api_token: ${{ secrets.STAGEMOLE_PARTNER_AUTH }}
xcode_test_plan: 'MullvadVPNUITestsChangeSettings'
- name: Store test report for changing all settings
uses: actions/upload-artifact@v4
if: always()
with:
name: test-report-change-all-other-settings
path: ios/test-report/junit.xml
- name: Checkout repository to get the current app version
uses: actions/checkout@v4
- name: Verify all other settings still changed on current app version
uses: ./.github/actions/ios-end-to-end-tests
if: always()
with:
ios_device_pin_code: ${{ secrets.IOS_DEVICE_PIN_CODE }}
test_device_identifier_uuid: ${{ secrets.IOS_TEST_DEVICE_IDENTIFIER_UUID }}
has_time_account_number: ${{ secrets.IOS_HAS_TIME_ACCOUNT_NUMBER_PRODUCTION }}
no_time_account_number: ${{ secrets.IOS_NO_TIME_ACCOUNT_NUMBER_PRODUCTION }}
test_device_udid: ${{ env.TEST_DEVICE_UDID }}
partner_api_token: ${{ secrets.STAGEMOLE_PARTNER_AUTH }}
xcode_test_plan: 'MullvadVPNUITestsVerifySettingsChanged'
- name: Store test report for verifying all other settings
uses: actions/upload-artifact@v4
if: always()
with:
name: test-report-verify-all-other-settings
path: ios/test-report/junit.xml