-
Notifications
You must be signed in to change notification settings - Fork 339
108 lines (95 loc) · 3.16 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
name: iOS Settings Migration Tests
concurrency:
group: ios-end-to-end-tests
cancel-in-progress: false
permissions:
contents: read
issues: write
pull-requests: write
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, ensure notifications for
# GitHub Actions are enabled.
# https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs
- cron: '0 0 * * *'
# Global environment variables for easy updates
env:
TEST_DEVICE_UDID: 00008130-0019181022F3803A
OLD_APP_COMMIT_HASH: "4319bfbe700d3e0f7ecfcd9d004a63f6f12c40ac"
jobs:
set_commit_hash:
name: Set Commit Hash Environment Variable
runs-on:
- self-hosted
- macOS
- ios-test
outputs:
old_app_commit_hash: ${{ steps.set-hash.outputs.old_app_commit_hash }}
steps:
- name: Set OLD_APP_COMMIT_HASH
id: set-hash
run: echo "::set-output name=old_app_commit_hash::${{ env.OLD_APP_COMMIT_HASH }}"
uninstall_app:
name: Uninstall Old App
runs-on:
- self-hosted
- macOS
- ios-test
needs: set_commit_hash
env:
TEST_DEVICE_UDID: 00008130-0019181022F3803A
steps:
- name: Install ios-deploy
run: brew install ios-deploy
- name: Verify Device Connection
run: ios-deploy --detect
- name: Uninstall Old App from Device
timeout-minutes: 10
run: ios-deploy --id ${{ env.TEST_DEVICE_UDID }} --uninstall_only --bundle_id net.mullvad.MullvadVPN
- name: Verify Uninstallation
run: |
if ios-deploy --id ${{ env.TEST_DEVICE_UDID }} --list | grep net.mullvad.MullvadVPN; then
echo "Uninstallation failed."
exit 1
else
echo "App successfully uninstalled."
fi
change_dns_settings:
name: Change DNS Settings on Old App Version
uses: ./.github/workflows/ios-end-to-end-tests.yml
needs:
- set_commit_hash
- uninstall_app
with:
arg_tests_json_key: "mullvadVPNUITestsChangeDNSSettings"
commit_hash: ${{ needs.set_commit_hash.outputs.old_app_commit_hash }}
secrets: inherit
verify_dns_settings:
name: Verify DNS Settings on Current App Version
needs:
- change_dns_settings
uses: ./.github/workflows/ios-end-to-end-tests.yml
with:
arg_tests_json_key: "mullvadVPNUITestsVerifyDNSSettingsChanged"
secrets: inherit
change_other_settings:
name: Change All Other Settings on Old App Version
needs:
- set_commit_hash
- verify_dns_settings
uses: ./.github/workflows/ios-end-to-end-tests.yml
with:
arg_tests_json_key: "mullvadVPNUITestsChangeSettings"
commit_hash: ${{ needs.set_commit_hash.outputs.old_app_commit_hash }}
secrets: inherit
verify_other_settings:
name: Verify All Other Settings on Current App Version
needs:
- change_other_settings
uses: ./.github/workflows/ios-end-to-end-tests.yml
with:
arg_tests_json_key: "mullvadVPNUITestsVerifySettingsChanged"
secrets: inherit