Add Linux support and CI - #31
Merged
Merged
Conversation
Adds conditional FoundationNetworking imports across Sources and Tests, removes a leftover Combine import, fixes a Linux-incompatible URLResponse() initializer in the test mock, and adds a Linux job to CI matrixed on Swift 6.0/6.3. Docs updated to reflect Linux support.
swift-actions/setup-swift@v2 ships a hardcoded version manifest that tops out at 6.2.1 and doesn't yet know about 6.3, so the "6.3" leg failed at setup with "Version 6.3 is not available". Also add fail-fast: false so one bad matrix leg doesn't cancel its sibling.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#if canImport(FoundationNetworking)imports across 22 source files and 23 test files that referenceURLRequest/URLResponse/URLSession, which live in a separate module on Linux.import Combinefrom a test file (dead on every platform, and a hard compile failure on Linux).URLResponse()in theURLSessionMocktest double — Linux'sURLResponsehas no bare initializer.test-linuxjob to CI, matrixed on Swift 6.0 (the package's tools-version floor) and 6.3 (current), skipping the macOS-only coverage step.No public API changes —
URLSessionProtocol'sdata(for:delegate:)signature is unchanged and works identically on Linux (verified against swift-corelibs-foundation).Test plan
swift buildon macOSswift teston macOS — 179/179 tests passswiftformat --lint .cleanswiftlint— no new violationstest-linuxmatrix legs (this PR is the actual Linux verification, since Docker isn't available locally)