|
14 | 14 | workflow_dispatch:
|
15 | 15 | jobs:
|
16 | 16 | test:
|
17 |
| - if: github.event.pull_request.merged |
| 17 | + if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch' |
18 | 18 | name: Screenshot tests
|
19 | 19 | runs-on: macos-13-xlarge
|
20 | 20 | env:
|
21 | 21 | SOURCE_PACKAGES_PATH: .spm
|
22 | 22 | TEST_ACCOUNT: ${{ secrets.IOS_TEST_ACCOUNT_NUMBER }}
|
| 23 | + PARTNER_API_TOKEN: ${{ secrets.STAGEMOLE_PARTNER_AUTH }} |
23 | 24 | steps:
|
24 | 25 | - name: Checkout repository
|
25 | 26 | uses: actions/checkout@v3
|
@@ -54,15 +55,17 @@ jobs:
|
54 | 55 |
|
55 | 56 | - name: Configure Xcode project
|
56 | 57 | run: |
|
57 |
| - cp Base.xcconfig.template Base.xcconfig |
58 |
| - cp App.xcconfig.template App.xcconfig |
59 |
| - cp PacketTunnel.xcconfig.template PacketTunnel.xcconfig |
60 |
| - cp Screenshots.xcconfig.template Screenshots.xcconfig |
61 |
| - cp Api.xcconfig.template Api.xcconfig |
62 |
| - cp UITests.xcconfig.template UITests.xcconfig |
63 |
| - sed -i "" "s/MULLVAD_ACCOUNT_TOKEN = /MULLVAD_ACCOUNT_TOKEN = $TEST_ACCOUNT/g" Screenshots.xcconfig |
| 58 | + for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done |
| 59 | + sed -i "" \ |
| 60 | + "/HAS_TIME_ACCOUNT_NUMBER =/ s#= .*#= 1234123412341234#" \ |
| 61 | + UITests.xcconfig |
64 | 62 | working-directory: ios/Configurations
|
65 | 63 |
|
| 64 | + - name: Install zip |
| 65 | + run: | |
| 66 | + brew update |
| 67 | + brew install zip |
| 68 | +
|
66 | 69 | - name: Install xcbeautify
|
67 | 70 | run: |
|
68 | 71 | brew update
|
|
82 | 85 | -destination "platform=iOS Simulator,name=iPhone 15" \
|
83 | 86 | -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_PATH" \
|
84 | 87 | -disableAutomaticPackageResolution \
|
| 88 | + -resultBundlePath xcode-test-report \ |
85 | 89 | test 2>&1 | xcbeautify
|
86 | 90 | working-directory: ios/
|
| 91 | + |
| 92 | + - name: Archive test report |
| 93 | + run: zip -r test-report.zip ios/xcode-test-report.xcresult |
| 94 | + |
| 95 | + - name: Store test report artifact |
| 96 | + if: always() |
| 97 | + uses: actions/upload-artifact@v4 |
| 98 | + with: |
| 99 | + name: test-report |
| 100 | + path: test-report.zip |
0 commit comments