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: CI | |
| # Build, lint, and run the unit tests on every push to main and on pull requests. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: SwiftLint | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install SwiftLint | |
| run: brew install swiftlint | |
| - name: Lint | |
| run: swiftlint lint --config QRCodeGen/.swiftlint.yml --strict | |
| 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 |