-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement `Blade` package * Implement `BladeTCA` package * Add support for Swift 5.7 and Swift 5.8 * Update GitHub Actions Workflow * Update `README.md` * Fix building errors * Implement cancelling request * Implement test cases * Implement `cursor` & `offset` pagination types * Remove `offset` parameter from `Page` * Implement `cursor` & `offset` paginations * Update `README.md` * Update `CHANGELOG.md`
- Loading branch information
1 parent
09e2a7f
commit 6e766eb
Showing
57 changed files
with
2,238 additions
and
112 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,20 +23,12 @@ jobs: | |
with: | ||
args: --strict | ||
env: | ||
|
||
DIFF_BASE: ${{ github.base_ref }} | ||
|
||
|
||
|
||
macOS: | ||
|
||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.runsOn }} | ||
|
||
env: | ||
|
||
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
|
||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -45,49 +37,37 @@ jobs: | |
- xcode: "Xcode_15.0" | ||
runsOn: macos-13 | ||
name: "macOS 13, Xcode 15.0, Swift 5.9.0" | ||
params: "-skipMacroValidation" | ||
- xcode: "Xcode_14.3.1" | ||
runsOn: macos-13 | ||
name: "macOS 13, Xcode 14.3.1, Swift 5.8.0" | ||
params: "" | ||
- xcode: "Xcode_14.2" | ||
runsOn: macOS-12 | ||
name: "macOS 12, Xcode 14.2, Swift 5.7.2" | ||
- xcode: "Xcode_14.1" | ||
runsOn: macOS-12 | ||
name: "macOS 12, Xcode 14.1, Swift 5.7.1" | ||
params: "" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
|
||
run: xcodebuild test -scheme "Blade-Package" -destination "platform=macOS" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
xcode: true | ||
|
||
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
||
name: ${{ matrix.name }} | ||
|
||
path: test_output | ||
|
||
|
||
|
||
iOS: | ||
|
||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.runsOn }} | ||
|
||
env: | ||
|
||
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
|
||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -97,34 +77,25 @@ jobs: | |
name: "iOS 17.0.1" | ||
xcode: "Xcode_15.0" | ||
runsOn: macos-13 | ||
params: "-skipMacroValidation" | ||
- destination: "OS=16.4,name=iPhone 14 Pro" | ||
name: "iOS 16.4" | ||
xcode: "Xcode_14.3.1" | ||
runsOn: macos-13 | ||
params: "" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
|
||
run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
||
name: ${{ matrix.name }} | ||
path: test_output | ||
|
||
|
||
|
||
|
||
tvOS: | ||
|
||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.runsOn }} | ||
|
||
env: | ||
|
||
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
|
||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -134,44 +105,31 @@ jobs: | |
name: "tvOS 17.0" | ||
xcode: "Xcode_15.0" | ||
runsOn: macos-13 | ||
params: "-skipMacroValidation" | ||
- destination: "OS=16.4,name=Apple TV" | ||
name: "tvOS 16.4" | ||
xcode: "Xcode_14.3.1" | ||
runsOn: macos-13 | ||
params: "" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
|
||
run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
xcode: true | ||
|
||
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
||
name: ${{ matrix.name }} | ||
|
||
path: test_output | ||
|
||
|
||
|
||
watchOS: | ||
|
||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.runsOn }} | ||
|
||
env: | ||
|
||
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
|
||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -181,47 +139,36 @@ jobs: | |
name: "watchOS 10.0" | ||
xcode: "Xcode_15.0" | ||
runsOn: macos-13 | ||
params: "-skipMacroValidation" | ||
- destination: "OS=9.4,name=Apple Watch Series 8 (45mm)" | ||
name: "watchOS 9.4" | ||
xcode: "Xcode_14.3.1" | ||
runsOn: macos-13 | ||
params: "" | ||
- destination: "OS=8.5,name=Apple Watch Series 7 (45mm)" | ||
name: "watchOS 8.5" | ||
xcode: "Xcode_14.3.1" | ||
runsOn: macos-13 | ||
params: "" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "{{ cookiecutter.name }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
|
||
run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
xcode: true | ||
|
||
xcode_archive_path: test_output/${{ matrix.name }}.xcresult | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
||
name: ${{ matrix.name }} | ||
|
||
path: test_output | ||
|
||
|
||
spm: | ||
|
||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.runsOn }} | ||
|
||
env: | ||
|
||
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | ||
|
||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -235,10 +182,11 @@ jobs: | |
runsOn: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: ${{ matrix.name }} | ||
run: swift build -c release --target "{{ cookiecutter.name }}" | ||
|
||
run: | | ||
swift build -c release --target "Blade" | ||
swift build -c release --target "BladeTCA" | ||
merge-test-reports: | ||
needs: [iOS, macOS, watchOS, tvOS] | ||
runs-on: macos-13 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
excluded: | ||
- Tests | ||
- Package.swift | ||
- [email protected] | ||
- [email protected] | ||
- .build | ||
|
||
# Rules | ||
|
@@ -9,6 +11,7 @@ disabled_rules: | |
- trailing_comma | ||
- todo | ||
- opening_brace | ||
- multiple_closures_with_trailing_closure | ||
|
||
opt_in_rules: # some rules are only opt-in | ||
- anyobject_protocol | ||
|
@@ -18,7 +21,6 @@ opt_in_rules: # some rules are only opt-in | |
- closure_end_indentation | ||
- closure_spacing | ||
- collection_alignment | ||
- conditional_returns_on_newline | ||
- contains_over_filter_count | ||
- contains_over_filter_is_empty | ||
- contains_over_first_not_nil | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
135 changes: 135 additions & 0 deletions
135
.swiftpm/xcode/xcshareddata/xcschemes/Blade-Package.xcscheme
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1520" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "Blade" | ||
BuildableName = "Blade" | ||
BlueprintName = "Blade" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BladeTCA" | ||
BuildableName = "BladeTCA" | ||
BlueprintName = "BladeTCA" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BladeTCATests" | ||
BuildableName = "BladeTCATests" | ||
BlueprintName = "BladeTCATests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BladeTests" | ||
BuildableName = "BladeTests" | ||
BlueprintName = "BladeTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<TestPlans> | ||
<TestPlanReference | ||
reference = "container:Tests/BladePackage.xctestplan" | ||
default = "YES"> | ||
</TestPlanReference> | ||
</TestPlans> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BladeTCATests" | ||
BuildableName = "BladeTCATests" | ||
BlueprintName = "BladeTCATests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</TestableReference> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "BladeTests" | ||
BuildableName = "BladeTests" | ||
BlueprintName = "BladeTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "Blade" | ||
BuildableName = "Blade" | ||
BlueprintName = "Blade" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
Oops, something went wrong.