KM-17521 Hide manage subscription link on Mac Catalyst #615
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Run tests for iOS" | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: macos-26 | |
| timeout-minutes: 60 | |
| env: | |
| TEST_RUNNER_PIA_TEST_USER: ${{ secrets.PIA_ACCOUNT_USERNAME}} | |
| TEST_RUNNER_PIA_TEST_PASSWORD: ${{ secrets.PIA_ACCOUNT_PASSWORD }} | |
| TEST_RUNNER_PIA_TEST_DEDICATEDIP: ${{ secrets.PIA_TEST_DEDICATEDIP }} | |
| steps: | |
| - name: Setup Git credentials | |
| run: | | |
| git config --global url."https://${{ secrets.ORG_GITHUB_USERNAME }}:${{ secrets.ORG_GITHUB_TOKEN }}@github.com/".insteadOf "git@github.com:" | |
| - uses: actions/checkout@v6 | |
| - name: Select Xcode version | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ env.XCODE_VERSION }} | |
| - name: Download iOS Platform | |
| timeout-minutes: 20 | |
| run: | | |
| # Check if iOS platform is already installed | |
| if xcrun simctl list devices available | grep -qi "iphone"; then | |
| echo "iOS platform already installed, skipping download" | |
| exit 0 | |
| fi | |
| # Retry up to 3 times if download fails | |
| max_attempts=3 | |
| attempt=1 | |
| while [ $attempt -le $max_attempts ]; do | |
| echo "Attempt $attempt of $max_attempts: Downloading iOS platform..." | |
| if xcodebuild -downloadPlatform iOS; then | |
| echo "iOS platform downloaded successfully" | |
| exit 0 | |
| else | |
| echo "Download failed on attempt $attempt" | |
| if [ $attempt -lt $max_attempts ]; then | |
| echo "Retrying in 10 seconds..." | |
| sleep 10 | |
| fi | |
| fi | |
| attempt=$((attempt + 1)) | |
| done | |
| echo "Failed to download iOS platform after $max_attempts attempts" | |
| exit 1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3.5' | |
| bundler-cache: true | |
| - name: Run iOS unit tests | |
| uses: nick-fields/retry@v4 | |
| with: | |
| timeout_minutes: 20 | |
| max_attempts: 2 | |
| retry_on: timeout | |
| command: bundle exec fastlane iOStests | |
| - name: Upload iOS test results | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ios-test-results | |
| path: | | |
| fastlane/test_output/ | |
| **/*.xcresult | |
| build/reports/ | |
| retention-days: 30 | |
| if-no-files-found: warn |