Skip to content

Commit 4fcb189

Browse files
authored
refactor: Consolidate build target (#190)
* refactor: Consolidate build target * update CI macOS * add test plan to project
1 parent f0a84a0 commit 4fcb189

File tree

11 files changed

+52
-411
lines changed

11 files changed

+52
-411
lines changed

.github/workflows/ci.yml

+40-1
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,53 @@ jobs:
4040
env:
4141
DEVELOPER_DIR: ${{ env.CI_XCODE }}
4242

43+
xcode-test-macos:
44+
runs-on: macos-13
45+
steps:
46+
- uses: actions/checkout@v3
47+
- name: Use multiple cores
48+
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
49+
- name: Build
50+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -testPlan ParseCareKit -scheme ParseCareKit -destination platform\=macOS -derivedDataPath DerivedData clean test | xcpretty
51+
env:
52+
DEVELOPER_DIR: ${{ env.CI_XCODE }}
53+
- name: Prepare codecov
54+
uses: sersoft-gmbh/swift-coverage-action@v3
55+
id: coverage-files
56+
with:
57+
target-name-filter: '^ParseCareKit$'
58+
format: lcov
59+
search-paths: ./DerivedData
60+
env:
61+
DEVELOPER_DIR: ${{ env.CI_XCODE }}
62+
- name: Upload coverage to Codecov
63+
uses: codecov/codecov-action@v3
64+
with:
65+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
66+
env_vars: MACOS
67+
env:
68+
DEVELOPER_DIR: ${{ env.CI_XCODE }}
69+
4370
xcode-build-watchos:
4471
runs-on: macos-latest
4572
steps:
4673
- uses: actions/checkout@v3
4774
- name: Use multiple cores
4875
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
4976
- name: Build
50-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme ParseCareKit-watchOS -destination platform\=watchOS\ Simulator,name\=Apple\ Watch\ Series\ 6\ \(44mm\) | xcpretty
77+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme ParseCareKit -destination platform\=watchOS\ Simulator,name\=Apple\ Watch\ Series\ 6\ \(44mm\) | xcpretty
78+
env:
79+
DEVELOPER_DIR: ${{ env.CI_XCODE }}
80+
81+
spm-test:
82+
timeout-minutes: 15
83+
runs-on: macos-latest
84+
steps:
85+
- uses: actions/checkout@v3
86+
- name: Use multiple cores
87+
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
88+
- name: Build-Test
89+
run: swift build -v
5190
env:
5291
DEVELOPER_DIR: ${{ env.CI_XCODE }}
5392

.spi.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
version: 1
22
builder:
33
configs:
4-
- platform: ios
5-
scheme: ParseCareKit
6-
documentation_targets: [ParseCareKit]
7-
- platform: watchos
8-
scheme: ParseCareKit-watchOS
4+
- documentation_targets: [ParseCareKit]

Package.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"kind" : "remoteSourceControl",
2424
"location" : "https://github.com/netreconlab/Parse-Swift.git",
2525
"state" : {
26-
"revision" : "0e409291a0a81b47dbea722a48aba61ef9ddafcd",
27-
"version" : "5.4.3"
26+
"revision" : "8e8a84725ed69fe6ec1302f3d9d18018deb0b914",
27+
"version" : "5.5.1"
2828
}
2929
},
3030
{

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/cbaker6/CareKit.git",
1515
.upToNextMajor(from: "3.0.0-beta.1")),
1616
.package(url: "https://github.com/netreconlab/Parse-Swift.git",
17-
.upToNextMajor(from: "5.4.3"))
17+
.upToNextMajor(from: "5.5.1"))
1818
],
1919
targets: [
2020
.target(

ParseCareKit-watchOS/Info.plist

-22
This file was deleted.

ParseCareKit-watchOS/ParseCareKit_watchOS.h

-19
This file was deleted.

ParseCareKit.xcodeproj/project.pbxproj

+5-240
Large diffs are not rendered by default.

ParseCareKit.xcodeproj/xcshareddata/xcschemes/ParseCareKit-watchOS.xcscheme

-67
This file was deleted.

ParseCareKit.xcodeproj/xcshareddata/xcschemes/ParseCareKitTests_watchOS.xcscheme

-52
This file was deleted.

ParseCareKit.xctestplan

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
}
1010
],
1111
"defaultOptions" : {
12-
"testExecutionOrdering" : "random"
12+
"testExecutionOrdering" : "random",
13+
"testRepetitionMode" : "retryOnFailure"
1314
},
1415
"testTargets" : [
1516
{

Sources/ParseCareKit/ParseRemote.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public class ParseRemote: OCKRemoteSynchronizable {
171171
}
172172

173173
do {
174-
let status = try await ParseHealth.check()
174+
let status = try await ParseServer.health()
175175
guard status == .ok else {
176176
Logger.pullRevisions.error("Server health is: \(status.rawValue)")
177177
completion(ParseCareKitError.parseHealthError)

0 commit comments

Comments
 (0)