Do not run fastlane tests in parallel #203
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: iOS Build and Test | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| test: | |
| name: Run iOS Tests | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: List available Xcode versions | |
| run: ls /Applications | grep Xcode | |
| - name: Set Xcode version | |
| run: sudo xcode-select -s /Applications/Xcode_26.0.1.app | |
| - name: Show Xcode version | |
| run: xcodebuild -version | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: '3.4' | |
| - name: Install dependencies | |
| run: bundle install | |
| - name: List available schemes | |
| run: xcodebuild -list -project SnapSafe.xcodeproj | |
| - name: Run tests with fastlane (non-parallel) | |
| run: | | |
| set -o pipefail | |
| RESULTDIR="$RUNNER_TEMP/xcresult/$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-$(date +%s)" | |
| mkdir -p "$RESULTDIR" | |
| bundle exec fastlane scan \ | |
| scheme:"SnapSafe" \ | |
| result_bundle:true \ | |
| disable_concurrent_testing:true \ | |
| output_directory:"$RESULTDIR" \ | |
| open_report:false | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: | | |
| fastlane/test_output/ | |
| fastlane/test_output/*.junit | |
| fastlane/test_output/*.html | |
| fastlane/test_output/*.xcresult | |
| retention-days: 30 | |
| - name: Publish test results | |
| if: always() | |
| uses: EnricoMi/publish-unit-test-result-action/macos@v2 | |
| with: | |
| files: | | |
| fastlane/test_output/*.junit | |
| check_name: iOS Test Results |