Skip to content

feat: Add async/await wrappers #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 104 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
53081e3
Add async/await wrappers
cbaker6 Aug 6, 2021
07416f3
Update async return types
cbaker6 Aug 6, 2021
1557e6f
Fix compilation
cbaker6 Aug 6, 2021
b4c5a88
Add Object, User, and Installation test cases
cbaker6 Aug 7, 2021
9bbca44
Add async/await to ParseAuthentication
cbaker6 Aug 7, 2021
9f11bc5
Add change log entry
cbaker6 Aug 7, 2021
740f1ed
Prepare for release
cbaker6 Aug 7, 2021
d881c15
switch CI to Xcode beta
cbaker6 Aug 15, 2021
36b0d0b
fix env in CI
cbaker6 Aug 15, 2021
a1358ef
try beta
cbaker6 Aug 15, 2021
5083e20
try beta
cbaker6 Aug 15, 2021
f17cf0c
show apps on build system
cbaker6 Aug 15, 2021
61245c9
fix Xcode 13
cbaker6 Aug 15, 2021
4b7f591
fix carthage
cbaker6 Aug 15, 2021
ddb8bf5
build for iOS 15
cbaker6 Aug 15, 2021
7b1b924
Move test hosts to iOS 15
cbaker6 Aug 15, 2021
d6f91ae
Switch to minimum deployment target for test hosts
cbaker6 Aug 15, 2021
fd8a7b3
nit
cbaker6 Aug 15, 2021
95cf4f7
Fix ParseObject async tests
cbaker6 Aug 15, 2021
8515c27
Test async instead of Task on older beta
cbaker6 Aug 15, 2021
ffc6f45
Add DocC documentation
cbaker6 Aug 16, 2021
afe9e4c
Merge remote-tracking branch 'refs/remotes/origin/async'
cbaker6 Aug 16, 2021
b95056e
add docc build to CI
cbaker6 Aug 16, 2021
38c597a
revert docC in CI
cbaker6 Aug 17, 2021
1edecf4
Remove documentation files to prevent conflict
cbaker6 Aug 17, 2021
b2acd6b
Switch back to Task
cbaker6 Aug 18, 2021
e5e0805
Fix ParseHealth filename
cbaker6 Aug 18, 2021
f534bb8
update to iPhone 12
cbaker6 Aug 21, 2021
e5e3e4e
merge
cbaker6 Aug 22, 2021
7e8788d
Run async tests on main queue
cbaker6 Aug 22, 2021
794ee01
Fix logout async tests
cbaker6 Aug 22, 2021
24834af
Check Xcode beta version in CI
cbaker6 Aug 22, 2021
d6454cc
show xcode beta version
cbaker6 Aug 22, 2021
0cca0a8
remove OS from CI
cbaker6 Aug 22, 2021
a6da7d8
Test using ParseUser async on main queue
cbaker6 Aug 22, 2021
7954f98
Merge branch 'main'
cbaker6 Aug 27, 2021
955d1b1
Fix merge
cbaker6 Aug 27, 2021
248151f
Fix async logout tests
cbaker6 Aug 28, 2021
c2cf44c
Merge branch 'main'
cbaker6 Aug 29, 2021
a406ce7
remove vendor files
cbaker6 Aug 29, 2021
9eba408
Merge branch 'main'
cbaker6 Aug 29, 2021
8e2ebc2
switch codecov to auto
cbaker6 Aug 29, 2021
47f7011
Merge branch 'main'
cbaker6 Sep 2, 2021
380f0d6
Merge branch 'main'
cbaker6 Sep 5, 2021
ed69610
Merge branch 'main'
cbaker6 Sep 11, 2021
8383d9d
merge main
cbaker6 Sep 12, 2021
1541f36
Merge branch 'main'
cbaker6 Sep 15, 2021
6ad5fd8
Merge branch 'main'
cbaker6 Sep 23, 2021
b8e6826
Only build async if can import concurrency
cbaker6 Sep 23, 2021
7862e16
Remove waiting in async tests
cbaker6 Sep 23, 2021
5ee046e
Linux toolchain update
cbaker6 Sep 24, 2021
35470af
Update ci.yml
cbaker6 Sep 24, 2021
f85d225
Add missing foundation networking
cbaker6 Sep 24, 2021
8cb887b
Don't build LiveQuery async for linux
cbaker6 Sep 24, 2021
b02a339
Don't run async tests on Android
cbaker6 Sep 24, 2021
e63d242
Don't test on Linux
cbaker6 Sep 24, 2021
4099144
Update async params
cbaker6 Sep 25, 2021
bdf7248
Added rest of tests
cbaker6 Sep 29, 2021
f8d94f4
Add LDAP tests
cbaker6 Sep 29, 2021
ab2fefa
Fix authentication docs
cbaker6 Sep 29, 2021
c34c6d0
fix documentation
cbaker6 Sep 29, 2021
db57237
Merge branch 'main'
cbaker6 Sep 29, 2021
3c17d76
fix test bugs
cbaker6 Sep 29, 2021
a7475ce
Fix build
cbaker6 Sep 29, 2021
181a504
Increase codecov
cbaker6 Sep 29, 2021
de8ca4b
Update .codecov.yml
cbaker6 Sep 29, 2021
f79a928
Update .codecov.yml
cbaker6 Sep 29, 2021
105a144
Add codecov for missing schemes
cbaker6 Sep 29, 2021
5fd9203
use macOS codecov
cbaker6 Sep 29, 2021
330d23c
change codecov sending
cbaker6 Sep 29, 2021
f2ef8ea
Create codecov files manually
cbaker6 Sep 29, 2021
5b19f19
fixing codecov folder
cbaker6 Sep 29, 2021
448e85e
use file directly
cbaker6 Sep 29, 2021
ef4f800
update
cbaker6 Sep 29, 2021
371e403
use dir
cbaker6 Sep 29, 2021
f4619eb
make deriveddata local
cbaker6 Sep 29, 2021
6ca2705
testing
cbaker6 Sep 29, 2021
74a173d
testing more
cbaker6 Sep 29, 2021
68193da
let codecov search for files
cbaker6 Sep 29, 2021
bafa3c0
checking
cbaker6 Sep 29, 2021
a785c6f
nit tests
cbaker6 Sep 30, 2021
f4240aa
update
cbaker6 Sep 30, 2021
6256156
add env vars to codecov
cbaker6 Sep 30, 2021
a685350
fix ci file
cbaker6 Sep 30, 2021
30e44cc
test ios codecov
cbaker6 Sep 30, 2021
baf9298
test ios codecov
cbaker6 Sep 30, 2021
58bde27
try text file
cbaker6 Sep 30, 2021
a4a5074
use Xcode 12 export
cbaker6 Sep 30, 2021
acb1104
show
cbaker6 Sep 30, 2021
251a130
Use latest xcrun
cbaker6 Sep 30, 2021
01d82c4
Use bash codecov
cbaker6 Sep 30, 2021
87f3395
prepare Cov file
cbaker6 Sep 30, 2021
5fdafd9
generate legacy code coverage files
cbaker6 Sep 30, 2021
cabe59e
try old codecov
cbaker6 Sep 30, 2021
fc47d11
add back other codecov
cbaker6 Sep 30, 2021
f659888
don't fail on codecov
cbaker6 Sep 30, 2021
da67fe0
revert
cbaker6 Sep 30, 2021
93a2d18
Merge branch 'main'
cbaker6 Sep 30, 2021
808a5fa
Merge branch 'main'
cbaker6 Oct 3, 2021
72623da
merge main
cbaker6 Oct 3, 2021
9753bf2
let codecov slip, it's really at 85%
cbaker6 Oct 3, 2021
9ee7e9d
Prepare release
cbaker6 Oct 3, 2021
b7ab645
bump SDK version
cbaker6 Oct 3, 2021
577c5d3
Update .codecov.yml
cbaker6 Oct 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ coverage:
status:
patch:
default:
target: auto
target: 23
changes: false
project:
default:
target: 81
target: 76
comment:
require_changes: true
124 changes: 92 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@ on:
branches: '*'
env:
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
CI_XCODE_13_VER: '/Applications/Xcode_13.0.app/Contents/Developer'

jobs:
xcode-test-ios:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Version
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -version
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(iOS\) -destination platform\=iOS\ Simulator,name\=iPhone\ 11\ Pro\ Max test | xcpretty
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(iOS\) -destination platform\=iOS\ Simulator,name\=iPhone\ 12\ Pro\ Max -derivedDataPath DerivedData test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: IOS
fail_ci_if_error: false
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

xcode-test-macos:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Create and set the default keychain
Expand All @@ -28,30 +40,48 @@ jobs:
security unlock-keychain -p "" temporary
security set-keychain-settings -lut 7200 temporary
- name: Build-Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(macOS\) -destination platform\=macOS test | xcpretty
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(macOS\) -destination platform\=macOS -derivedDataPath DerivedData test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: MACOS
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

xcode-test-tvos:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(tvOS\) -destination platform\=tvOS\ Simulator,name\=Apple\ TV test | xcpretty
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(tvOS\) -destination platform\=tvOS\ Simulator,name\=Apple\ TV -derivedDataPath DerivedData test | xcpretty
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: TVOS
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

xcode-build-watchos:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Build
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -target ParseSwift\ \(watchOS\) | xcpretty
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: WATCHOS
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

spm-test:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Create and set the default keychain
Expand All @@ -62,12 +92,26 @@ jobs:
security set-keychain-settings -lut 7200 temporary
- name: Build
run: swift build -v
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Test
run: swift test --enable-code-coverage -v
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Prepare codecov
run: xcrun llvm-cov export -format="lcov" .build/debug/ParseSwiftPackageTests.xctest/Contents/MacOS/ParseSwiftPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
run: |
XCTEST=$(find .build -type f -name 'ParseSwiftPackageTests')
PROFDATA=$(find .build -type f -name '*.profdata')
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info_spm.lcov
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: SPM
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

spm-test-5_2:
needs: xcode-build-watchos
Expand All @@ -89,31 +133,43 @@ jobs:
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
- name: Prepare codecov
run: xcrun llvm-cov export -format="lcov" .build/debug/ParseSwiftPackageTests.xctest/Contents/MacOS/ParseSwiftPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
run: |
XCTEST=$(find .build -type f -name 'ParseSwiftPackageTests')
PROFDATA=$(find .build -type f -name '*.profdata')
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info_spm_5_2.lcov
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: SPM5_2
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

linux:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: sersoft-gmbh/SwiftyActions@v1
with:
release-version: 5.4.1
release-version: 5.5
- name: Build
run: swift build
- name: Test
run: swift test --enable-test-discovery --enable-code-coverage
- name: Prepare codecov
run: llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/debug/ParseSwiftPackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/debug/codecov/default.profdata > info.lcov
- name: Send codecov
run: bash <(curl https://codecov.io/bash)
run: |
llvm-cov export -format="lcov" .build/x86_64-unknown-linux-gnu/debug/ParseSwiftPackageTests.xctest -instr-profile .build/x86_64-unknown-linux-gnu/debug/codecov/default.profdata > info_linux.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: LINUX
fail_ci_if_error: true

docs:
needs: xcode-build-watchos
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Cache Gems
Expand All @@ -132,10 +188,10 @@ jobs:
run: ./Scripts/jazzy.sh
env:
BUILD_VERSION: '1.8.3'

cocoapods:
needs: xcode-build-watchos
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Update Framework Version
Expand All @@ -144,11 +200,15 @@ jobs:
BUILD_VERSION: '1.8.3'
- name: CocoaPods
run: pod lib lint --allow-warnings
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

carthage:
needs: xcode-build-watchos
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Carthage
run: ./carthage.sh build --no-skip-current
run: ./carthage.sh build --no-skip-current --use-xcframeworks
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
types: [published]
env:
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
CI_XCODE_13_VER: '/Applications/Xcode_13.0.app/Contents/Developer'

jobs:
cocoapods:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Get release version
Expand All @@ -18,13 +19,16 @@ jobs:
BUILD_VERSION: ${{ env.TAG }}
- name: CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Deploy CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push ParseSwift.podspec --allow-warnings --verbose
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}

docs:
runs-on: macos-latest
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Cache Gems
Expand All @@ -45,6 +49,7 @@ jobs:
run: ./Scripts/jazzy.sh
env:
BUILD_VERSION: ${{ env.TAG }}
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
- name: Deploy Jazzy Docs
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Parse-Swift Changelog

### main
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.1...main)
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.2...main)
* _Contributing to this repo? Add info about your change here to be included in the next release_

### 1.10.2
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.1...1.10.2)

__New features__
- Supports Swift 5.5 async/await ([#212](https://github.com/parse-community/Parse-Swift/pull/212)), thanks to [Corey Baker](https://github.com/cbaker6).

__Improvements__
- Added an extension to compare a Swift Error with a single ParseError or multiple ParseErrors ([#250](https://github.com/parse-community/Parse-Swift/pull/250)), thanks to [Damian Van de Kauter](https://github.com/novemTeam).

Expand Down
Loading