Skip to content

Commit

Permalink
refactor: Consolidate build target (#190)
Browse files Browse the repository at this point in the history
* refactor: Consolidate build target

* update CI macOS

* add test plan to project
  • Loading branch information
cbaker6 authored May 11, 2023
1 parent f0a84a0 commit 4fcb189
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 411 deletions.
41 changes: 40 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,53 @@ jobs:
env:
DEVELOPER_DIR: ${{ env.CI_XCODE }}

xcode-test-macos:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Use multiple cores
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -testPlan ParseCareKit -scheme ParseCareKit -destination platform\=macOS -derivedDataPath DerivedData clean test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE }}
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
with:
target-name-filter: '^ParseCareKit$'
format: lcov
search-paths: ./DerivedData
env:
DEVELOPER_DIR: ${{ env.CI_XCODE }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: MACOS
env:
DEVELOPER_DIR: ${{ env.CI_XCODE }}

xcode-build-watchos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Use multiple cores
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme ParseCareKit-watchOS -destination platform\=watchOS\ Simulator,name\=Apple\ Watch\ Series\ 6\ \(44mm\) | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme ParseCareKit -destination platform\=watchOS\ Simulator,name\=Apple\ Watch\ Series\ 6\ \(44mm\) | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE }}

spm-test:
timeout-minutes: 15
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Use multiple cores
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
- name: Build-Test
run: swift build -v
env:
DEVELOPER_DIR: ${{ env.CI_XCODE }}

Expand Down
6 changes: 1 addition & 5 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
version: 1
builder:
configs:
- platform: ios
scheme: ParseCareKit
documentation_targets: [ParseCareKit]
- platform: watchos
scheme: ParseCareKit-watchOS
- documentation_targets: [ParseCareKit]
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/netreconlab/Parse-Swift.git",
"state" : {
"revision" : "0e409291a0a81b47dbea722a48aba61ef9ddafcd",
"version" : "5.4.3"
"revision" : "8e8a84725ed69fe6ec1302f3d9d18018deb0b914",
"version" : "5.5.1"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
.package(url: "https://github.com/cbaker6/CareKit.git",
.upToNextMajor(from: "3.0.0-beta.1")),
.package(url: "https://github.com/netreconlab/Parse-Swift.git",
.upToNextMajor(from: "5.4.3"))
.upToNextMajor(from: "5.5.1"))
],
targets: [
.target(
Expand Down
22 changes: 0 additions & 22 deletions ParseCareKit-watchOS/Info.plist

This file was deleted.

19 changes: 0 additions & 19 deletions ParseCareKit-watchOS/ParseCareKit_watchOS.h

This file was deleted.

245 changes: 5 additions & 240 deletions ParseCareKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion ParseCareKit.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
}
],
"defaultOptions" : {
"testExecutionOrdering" : "random"
"testExecutionOrdering" : "random",
"testRepetitionMode" : "retryOnFailure"
},
"testTargets" : [
{
Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseCareKit/ParseRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public class ParseRemote: OCKRemoteSynchronizable {
}

do {
let status = try await ParseHealth.check()
let status = try await ParseServer.health()
guard status == .ok else {
Logger.pullRevisions.error("Server health is: \(status.rawValue)")
completion(ParseCareKitError.parseHealthError)
Expand Down

0 comments on commit 4fcb189

Please sign in to comment.