Architecture version 2 #16
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 CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test-and-analyze: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Run tests with coverage | |
| run: | | |
| xcodebuild test \ | |
| -project WeatherApp.xcodeproj \ | |
| -scheme WeatherApp \ | |
| -destination 'platform=iOS Simulator,name=iPhone 17 Pro' \ | |
| -enableCodeCoverage YES \ | |
| -resultBundlePath TestResults.xcresult | |
| - name: Run static analysis | |
| run: | | |
| xcodebuild analyze \ | |
| -project WeatherApp.xcodeproj \ | |
| -scheme WeatherApp \ | |
| -destination 'platform=iOS Simulator,name=iPhone 17 Pro' | |
| - name: Export coverage report | |
| run: | | |
| xcrun xccov view --report TestResults.xcresult > coverage.txt | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: weatherapp-coverage | |
| path: coverage.txt |