Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- debug
- release
xcode:
- '16.2'
- '16.4'
name: macOS 15
runs-on: macos-15
steps:
Expand All @@ -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

Expand All @@ -66,7 +48,7 @@ jobs:
- Debug
- Release
xcode:
- '16.2'
- '16.4'
name: Examples
runs-on: macos-15
steps:
Expand Down
32 changes: 13 additions & 19 deletions Sources/IssueReporting/ReportIssue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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.
Expand Down