diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b95959d..badb85a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - debug - release xcode: - - '16.2' + - '16.4' name: macOS 15 runs-on: macos-15 steps: @@ -31,31 +31,13 @@ jobs: - name: Run tests run: make test-${{ matrix.config }} - macos-14: - strategy: - matrix: - config: - - debug - - release - xcode: - - 15.2 - - 15.4 - name: macOS 14 - runs-on: macos-14 - steps: - - uses: actions/checkout@v4 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - - name: Run tests - run: make test-${{ matrix.config }} - library-evolution: name: Library evolution runs-on: macos-15 steps: - uses: actions/checkout@v4 - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_16.2.app + run: sudo xcode-select -s /Applications/Xcode_16.4.app - name: Run tests run: make build-for-library-evolution @@ -66,7 +48,7 @@ jobs: - Debug - Release xcode: - - '16.2' + - '16.4' name: Examples runs-on: macos-15 steps: diff --git a/Sources/IssueReporting/ReportIssue.swift b/Sources/IssueReporting/ReportIssue.swift index b7160d9..81ac120 100644 --- a/Sources/IssueReporting/ReportIssue.swift +++ b/Sources/IssueReporting/ReportIssue.swift @@ -40,7 +40,7 @@ public func reportIssue( IssueContext.current?.line ?? line, IssueContext.current?.column ?? column ) - guard let context = TestContext.current else { + guard TestContext.current != nil else { guard !isTesting else { return } if let observer = FailureObserver.current { observer.withLock { $0 += 1 } @@ -66,24 +66,18 @@ public func reportIssue( } return } - - switch context { - case .swiftTesting: - _recordIssue( - message: message(), - fileID: "\(fileID)", - filePath: "\(filePath)", - line: Int(line), - column: Int(column) - ) - case .xcTest: - _XCTFail( - message().withAppHostWarningIfNeeded() ?? "", - file: filePath, - line: line - ) - @unknown default: break - } + _recordIssue( + message: message(), + fileID: "\(fileID)", + filePath: "\(filePath)", + line: Int(line), + column: Int(column) + ) + _XCTFail( + message().withAppHostWarningIfNeeded() ?? "", + file: filePath, + line: line + ) } /// Report a caught error.