|
17 | 17 | inputs:
|
18 | 18 | # Optionally specify a test case or suite to run.
|
19 | 19 | # Must be in the format MullvadVPNUITest/<test-suite-name>/<test-case-name> where test case name is optional.
|
20 |
| - test_name: |
| 20 | + user_supplied_test_name: |
21 | 21 | description: 'Only run test case/suite'
|
22 | 22 | required: false
|
23 | 23 | schedule:
|
@@ -52,10 +52,17 @@ jobs:
|
52 | 52 | if [ -n "$TEST_NAME" ]; then
|
53 | 53 | echo "::set-output name=test_runs_json::'[\"$TEST_NAME\"]'"
|
54 | 54 | else
|
55 |
| - # List test suites based on file names |
56 |
| - test_suites=$(find . -name "*Tests.swift" | sed 's/.*\///' | sed 's/\.swift//' | sed '/SettingsMigrationTests/d' | sort) |
57 |
| - test_suites_json=$(printf "$test_suites" | jq --compact-output --raw-input --slurp 'split("\n")') |
58 |
| - echo "test_suites_json=$test_suites_json" >> $GITHUB_ENV |
| 55 | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then |
| 56 | + test_suites_json=$(jq -r --compact-output .tests.pr-merge-to-main tests.json) |
| 57 | + echo "test_suites_json=$test_suites_json" >> $GITHUB_ENV |
| 58 | + elif [[ "${{ github.event_name }}" == "schedule" ]] | [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then |
| 59 | + test_suites_json=$(jq -r --compact-output .tests.all tests.json) |
| 60 | + echo "test_suites_json=$test_suites_json" >> $GITHUB_ENV |
| 61 | + # List test suites based on file names |
| 62 | + #test_suites=$(find . -name "*Tests.swift" | sed 's/.*\///' | sed 's/\.swift//' | sed '/SettingsMigrationTests/d' | sort) |
| 63 | + #test_suites_json=$(printf "$test_suites" | jq --compact-output --raw-input --slurp 'split("\n")') |
| 64 | + #echo "test_suites_json=$test_suites_json" >> $GITHUB_ENV |
| 65 | + fi |
59 | 66 | fi
|
60 | 67 | working-directory: ios/MullvadVPNUITests
|
61 | 68 | outputs:
|
@@ -109,7 +116,7 @@ jobs:
|
109 | 116 | uses: ./.github/actions/build-ios-e2e-tests
|
110 | 117 | with:
|
111 | 118 | xcode_test_plan: ${{ env.XCODE_TEST_PLAN }}
|
112 |
| - test_name: ${{ github.event.inputs.test_name }} |
| 119 | + test_name: ${{ github.event.inputs.user_supplied_test_name }} |
113 | 120 | ios_device_pin_code: ${{ secrets.IOS_DEVICE_PIN_CODE }}
|
114 | 121 | test_device_identifier_uuid: ${{ secrets.IOS_TEST_DEVICE_IDENTIFIER_UUID }}
|
115 | 122 | has_time_account_number: ${{ secrets.IOS_HAS_TIME_ACCOUNT_NUMBER_PRODUCTION }}
|
|
0 commit comments