Skip to content

Commit

Permalink
Swift Testing support (#3229)
Browse files Browse the repository at this point in the history
* wip

* wip

* Update Testing.md

* wip

* wip

* wip

* wip

* wip:

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* disable library evolution

* bump

* wip

---------

Co-authored-by: Brandon Williams <[email protected]>
  • Loading branch information
stephencelis and mbrandonw authored Jul 23, 2024
1 parent 1b627dc commit 3e830b5
Show file tree
Hide file tree
Showing 63 changed files with 1,370 additions and 657 deletions.
50 changes: 25 additions & 25 deletions .github/package.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb",
"version" : "1.0.0"
"revision" : "487a4d151e795a5e076a7e7aedcd13c2ebff6c31",
"version" : "1.0.1"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b",
"version" : "1.4.0"
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
Expand All @@ -32,17 +32,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "b9ad2661b6e8fb411fef6a441c9955c3413afac0",
"version" : "1.5.0"
"revision" : "031704ba0634b45e02fe875b8ddddc7f30a07f49",
"version" : "1.5.3"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "a8421d68068d8f45fbceb418fbf22c5dad4afd33",
"version" : "1.0.2"
"revision" : "eb64eacfed55635a771e3410f9c91de46cf5c6a0",
"version" : "1.0.3"
}
},
{
Expand All @@ -68,17 +68,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "f01efb26f3a192a0e88dcdb7c3c391ec2fc25d9c",
"version" : "1.3.0"
"revision" : "d237304f42af07f22563aa4cc2d7e2cfb25da82e",
"version" : "1.3.1"
}
},
{
"identity" : "swift-dependencies",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "9085501f168b08f5205b68f1b8a0d56bb52b8c1a",
"version" : "1.3.2"
"revision" : "52018827ce21e482a36e3795bea2666b3898164c",
"version" : "1.3.4"
}
},
{
Expand Down Expand Up @@ -108,6 +108,15 @@
"version" : "1.1.0"
}
},
{
"identity" : "swift-issue-reporting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-issue-reporting",
"state" : {
"revision" : "926f43898706eaa127db79ac42138e1ad7e85a3f",
"version" : "1.2.0"
}
},
{
"identity" : "swift-macro-testing",
"kind" : "remoteSourceControl",
Expand All @@ -122,8 +131,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-perception",
"state" : {
"revision" : "68901eac31c13c7d1ffef8e1bd8c3870ca2eaa95",
"version" : "1.3.2"
"revision" : "2c75ce556a6fc106721b0dadc2c7327244ad3999",
"version" : "1.3.3"
}
},
{
Expand All @@ -149,17 +158,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swiftui-navigation",
"state" : {
"revision" : "b7c9a79f6f6b1fefb87d3e5a83a9c2fe7cdc9720",
"version" : "1.5.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "6f30bdba373bbd7fbfe241dddd732651f2fbd1e2",
"version" : "1.1.2"
"revision" : "97f854044356ac082e7e698f39264cc035544d77",
"version" : "1.5.2"
}
}
],
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
- name: Run ${{ matrix.config }} tests
run: make CONFIG=${{ matrix.config }} test-library

library-evolution:
name: Library (evolution)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.4
run: sudo xcode-select -s /Applications/Xcode_15.4.app
- name: Build for library evolution
run: make build-for-library-evolution
# library-evolution:
# name: Library (evolution)
# runs-on: macos-14
# steps:
# - uses: actions/checkout@v4
# - name: Select Xcode 15.4
# run: sudo xcode-select -s /Applications/Xcode_15.4.app
# - name: Build for library evolution
# run: make build-for-library-evolution

library-compatibility:
name: Library (Swift 5.9)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb",
"version" : "1.0.0"
"revision" : "487a4d151e795a5e076a7e7aedcd13c2ebff6c31",
"version" : "1.0.1"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b",
"version" : "1.4.0"
"revision" : "41982a3656a71c768319979febd796c6fd111d5c",
"version" : "1.5.0"
}
},
{
Expand All @@ -32,17 +32,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "b9ad2661b6e8fb411fef6a441c9955c3413afac0",
"version" : "1.5.0"
"revision" : "031704ba0634b45e02fe875b8ddddc7f30a07f49",
"version" : "1.5.3"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "a8421d68068d8f45fbceb418fbf22c5dad4afd33",
"version" : "1.0.2"
"revision" : "eb64eacfed55635a771e3410f9c91de46cf5c6a0",
"version" : "1.0.3"
}
},
{
Expand All @@ -68,17 +68,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "f01efb26f3a192a0e88dcdb7c3c391ec2fc25d9c",
"version" : "1.3.0"
"revision" : "d237304f42af07f22563aa4cc2d7e2cfb25da82e",
"version" : "1.3.1"
}
},
{
"identity" : "swift-dependencies",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "d80613633e76d1ef86f41926e72fbef6a2f77d9c",
"version" : "1.3.3"
"revision" : "52018827ce21e482a36e3795bea2666b3898164c",
"version" : "1.3.4"
}
},
{
Expand Down Expand Up @@ -108,6 +108,15 @@
"version" : "1.1.0"
}
},
{
"identity" : "swift-issue-reporting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-issue-reporting",
"state" : {
"revision" : "926f43898706eaa127db79ac42138e1ad7e85a3f",
"version" : "1.2.0"
}
},
{
"identity" : "swift-macro-testing",
"kind" : "remoteSourceControl",
Expand All @@ -122,8 +131,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-perception",
"state" : {
"revision" : "68901eac31c13c7d1ffef8e1bd8c3870ca2eaa95",
"version" : "1.3.2"
"revision" : "2c75ce556a6fc106721b0dadc2c7327244ad3999",
"version" : "1.3.3"
}
},
{
Expand Down Expand Up @@ -158,17 +167,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swiftui-navigation",
"state" : {
"revision" : "b7c9a79f6f6b1fefb87d3e5a83a9c2fe7cdc9720",
"version" : "1.5.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "6f30bdba373bbd7fbfe241dddd732651f2fbd1e2",
"version" : "1.1.2"
"revision" : "97f854044356ac082e7e698f39264cc035544d77",
"version" : "1.5.2"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -65,7 +65,7 @@
<EnvironmentVariable
key = "CI"
value = "$(CI)"
isEnabled = "NO">
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Examples/Integration/Integration.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@
repositoryURL = "https://github.com/pointfreeco/swiftui-navigation.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.1.0;
minimumVersion = 1.5.2;
};
};
DC6268512AD1E06300F2E2EF /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ class BaseIntegrationTests: XCTestCase {
@MainActor
var app: XCUIApplication!
var logs: XCUIElement!
private var _expectRuntimeWarnings: (file: StaticString, line: UInt)?
private var _expectRuntimeWarnings: (filePath: StaticString, line: UInt)?

func expectRuntimeWarnings(file: StaticString = #file, line: UInt = #line) {
self._expectRuntimeWarnings = (file, line)
func expectRuntimeWarnings(filePath: StaticString = #filePath, line: UInt = #line) {
self._expectRuntimeWarnings = (filePath, line)
}

@MainActor
Expand Down Expand Up @@ -61,7 +61,7 @@ class BaseIntegrationTests: XCTestCase {
func assertLogs(
_ logConfiguration: LogConfiguration = .unordered,
matches expectedLogs: (() -> String)? = nil,
file: StaticString = #file,
filePath: StaticString = #filePath,
function: StaticString = #function,
line: UInt = #line,
column: UInt = #column
Expand All @@ -78,7 +78,8 @@ class BaseIntegrationTests: XCTestCase {
of: logs,
as: ._lines,
matches: expectedLogs,
file: file,
fileID: fileID,
file: filePath,
function: function,
line: line,
column: column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ func XCTTODO(_ message: String) {
extension XCUIElement {
func find(
timeout: TimeInterval = 0.3,
file: StaticString = #file,
filePath: StaticString = #filePath,
line: UInt = #line
) -> XCUIElement {
if !self.waitForExistence(timeout: timeout) {
XCTFail("Failed to find \(self).", file: file, line: line)
XCTFail("Failed to find \(self).", file: filePath, line: line)
}
return self
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Examples/SyncUps/SyncUps.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
repositoryURL = "https://github.com/pointfreeco/swiftui-navigation.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.2.0;
minimumVersion = 1.5.2;
};
};
DC808DB429E9C58F0072B4A9 /* XCRemoteSwiftPackageReference "swift-tagged" */ = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 3e830b5

Please sign in to comment.