diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/ios-screenshots-creation.yml | 15 | ||||
| -rw-r--r-- | .github/workflows/ios-screenshots-tests.yml | 30 |
2 files changed, 31 insertions, 14 deletions
diff --git a/.github/workflows/ios-screenshots-creation.yml b/.github/workflows/ios-screenshots-creation.yml index 4b7e6a3692..a8789a2be7 100644 --- a/.github/workflows/ios-screenshots-creation.yml +++ b/.github/workflows/ios-screenshots-creation.yml @@ -38,18 +38,21 @@ jobs: - name: Configure Xcode project run: | - cp Base.xcconfig.template Base.xcconfig - cp App.xcconfig.template App.xcconfig - cp PacketTunnel.xcconfig.template PacketTunnel.xcconfig - cp Screenshots.xcconfig.template Screenshots.xcconfig - cp Api.xcconfig.template Api.xcconfig - sed -i "" "s/MULLVAD_ACCOUNT_TOKEN = /MULLVAD_ACCOUNT_TOKEN = $TEST_ACCOUNT/g" Screenshots.xcconfig + for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done + sed -i "" \ + "/HAS_TIME_ACCOUNT_NUMBER =/ s#= .*#= 1234123412341234#" \ + UITests.xcconfig working-directory: ios/Configurations - name: Bundle run: bundle install working-directory: ios + - name: Install protobuf + run: | + brew update + brew install protobuf + - name: Create screenshots run: bundle exec fastlane snapshot --cloned_source_packages_path "$SOURCE_PACKAGES_PATH" working-directory: ios diff --git a/.github/workflows/ios-screenshots-tests.yml b/.github/workflows/ios-screenshots-tests.yml index 7bc5cd670d..d78ca6ef51 100644 --- a/.github/workflows/ios-screenshots-tests.yml +++ b/.github/workflows/ios-screenshots-tests.yml @@ -14,12 +14,13 @@ on: workflow_dispatch: jobs: test: - if: github.event.pull_request.merged + if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch' name: Screenshot tests runs-on: macos-13-xlarge env: SOURCE_PACKAGES_PATH: .spm TEST_ACCOUNT: ${{ secrets.IOS_TEST_ACCOUNT_NUMBER }} + PARTNER_API_TOKEN: ${{ secrets.STAGEMOLE_PARTNER_AUTH }} steps: - name: Checkout repository uses: actions/checkout@v3 @@ -54,15 +55,17 @@ jobs: - name: Configure Xcode project run: | - cp Base.xcconfig.template Base.xcconfig - cp App.xcconfig.template App.xcconfig - cp PacketTunnel.xcconfig.template PacketTunnel.xcconfig - cp Screenshots.xcconfig.template Screenshots.xcconfig - cp Api.xcconfig.template Api.xcconfig - cp UITests.xcconfig.template UITests.xcconfig - sed -i "" "s/MULLVAD_ACCOUNT_TOKEN = /MULLVAD_ACCOUNT_TOKEN = $TEST_ACCOUNT/g" Screenshots.xcconfig + for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done + sed -i "" \ + "/HAS_TIME_ACCOUNT_NUMBER =/ s#= .*#= 1234123412341234#" \ + UITests.xcconfig working-directory: ios/Configurations + - name: Install zip + run: | + brew update + brew install zip + - name: Install xcbeautify run: | brew update @@ -82,5 +85,16 @@ jobs: -destination "platform=iOS Simulator,name=iPhone 15" \ -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_PATH" \ -disableAutomaticPackageResolution \ + -resultBundlePath xcode-test-report \ test 2>&1 | xcbeautify working-directory: ios/ + + - name: Archive test report + run: zip -r test-report.zip ios/xcode-test-report.xcresult + + - name: Store test report artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-report + path: test-report.zip |
