Update README.md #2
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: Unit Tests | |
| # Build and run the unit tests on every push to main and on pull requests. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Build & Unit Test | |
| runs-on: macos-26 | |
| env: | |
| PROJECT: QRCodeGen/QRCodeGen.xcodeproj | |
| SCHEME: QRCodeGen | |
| DEVICE: iPhone 16 Pro | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode 26 | |
| run: sudo xcode-select -switch /Applications/Xcode_26.app | |
| - name: Install xcbeautify | |
| run: brew install xcbeautify | |
| - name: Show available simulators | |
| run: xcrun simctl list devices available | |
| - name: Build & run unit tests | |
| run: | | |
| set -o pipefail | |
| xcodebuild test \ | |
| -project "$PROJECT" \ | |
| -scheme "$SCHEME" \ | |
| -destination "platform=iOS Simulator,name=$DEVICE,OS=latest" \ | |
| -only-testing:QRCodeGenTests \ | |
| -resultBundlePath TestResults.xcresult \ | |
| -enableCodeCoverage YES \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| | xcbeautify | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TestResults | |
| path: TestResults.xcresult |