Big sur compatibility removal #7
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: Unit Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/tests.yml' | |
| - '**/*.swift' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run unit tests with code coverage | |
| run: | | |
| xcodebuild test \ | |
| -project "PPPC Utility.xcodeproj" \ | |
| -scheme "PPPC Utility" \ | |
| -destination "platform=macOS" \ | |
| -enableCodeCoverage YES \ | |
| -resultBundlePath TestResults.xcresult \ | |
| CODE_SIGN_IDENTITY="-" \ | |
| CODE_SIGNING_REQUIRED=NO | |
| - name: Display code coverage summary | |
| if: always() | |
| run: | | |
| if [ ! -d TestResults.xcresult ]; then | |
| echo "Coverage bundle 'TestResults.xcresult' not found; skipping coverage summary." | |
| exit 0 | |
| fi | |
| # Generate coverage report; capture output while still printing it | |
| echo "Generating coverage report from TestResults.xcresult..." | |
| if ! xcrun xccov view --report TestResults.xcresult | tee coverage-report.txt; then | |
| echo "Failed to generate coverage report with xccov; printing any captured output and continuing." | |
| cat coverage-report.txt 2>/dev/null || true | |
| exit 0 | |
| fi | |
| echo | |
| echo "Filtered coverage summary (matching app targets or PPPC-Utility/Source):" | |
| if ! grep -E '^[A-Z].*\.app|PPPC-Utility/Source' coverage-report.txt; then | |
| echo | |
| echo "No matching coverage lines found; displaying full coverage report instead." | |
| cat coverage-report.txt | |
| fi |