Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
all-tests:
name: All Tests Summary
needs: [test-swift, test-objc, build-ios]
runs-on: ubuntu-latest
runs-on: macos-14
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the runner from ubuntu-latest to macos-14 for the "all-tests" job seems unrelated to the PR's stated purpose of "skipping network integration tests on CI." The all-tests job only echoes a message and doesn't run any tests itself. If this change is necessary, it should be explained in the PR description. Otherwise, it appears to be an unintended change that increases CI costs without clear benefit (macOS runners are more expensive than Ubuntu runners).

Copilot uses AI. Check for mistakes.
steps:
- name: All Tests Passed
run: echo "All tests passed successfully!"
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "RealReachability2",
platforms: [
.iOS(.v12),
.iOS(.v13),
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iOS version change from v12 to v13 aligns the Package.swift with the documented Swift version requirements (iOS 13+) in the README and the comment on line 22. However, this change is not mentioned in the PR description, and it's unclear if this is intended to be part of this PR or an unrelated fix. If this is fixing a previous misconfiguration, it should be documented in the PR description. Also note that this could be a breaking change for anyone who was using the library on iOS 12 (even though it was never officially supported according to the README).

Copilot uses AI. Check for mistakes.
.macOS(.v10_15)
],
products: [
Expand Down Expand Up @@ -42,4 +42,4 @@ let package = Package(
path: "Tests/RealReachability2ObjCTests"
)
]
)
)
7 changes: 7 additions & 0 deletions Tests/RealReachability2Tests/ProberIntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import XCTest
@available(iOS 13.0, macOS 10.15, *)
final class ProberIntegrationTests: XCTestCase {

override func setUpWithError() throws {
// Integration tests require external network; skip on CI to avoid hangs/flakes
if ProcessInfo.processInfo.environment["CI"] == "true" {
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a more robust check for the CI environment variable. The current implementation only checks for the string "true", but environment variables can sometimes have different values. A safer approach would be to check if the environment variable exists at all, like: if ProcessInfo.processInfo.environment["CI"] != nil. This would catch cases where CI might be set to "1", "TRUE", or any other truthy value.

Suggested change
if ProcessInfo.processInfo.environment["CI"] == "true" {
if ProcessInfo.processInfo.environment["CI"] != nil {

Copilot uses AI. Check for mistakes.
throw XCTSkip("Skipping network integration tests on CI environment")
}
}
Comment on lines +15 to +20
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration tests are still being explicitly run in the CI workflow on line 36-37, but the new setUpWithError method will skip all tests in this file when CI=true. This means the "Run Swift Integration Tests" step will pass but skip all tests, which may give a false sense of test coverage. Consider either:

  1. Removing the "Run Swift Integration Tests" step from the CI workflow since these tests are now skipped, or
  2. Re-evaluating whether these tests should be skipped entirely, or if there's a way to make them work on CI (e.g., with proper network configuration)

Copilot uses AI. Check for mistakes.

// MARK: - HTTP Prober Integration Tests

func testHTTPProberWithDefaultURL() async {
Expand Down