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