-
Notifications
You must be signed in to change notification settings - Fork 35
Swift client runtime circleci setup #25
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
Swift client runtime circleci setup #25
Conversation
Testing ignoring tests in computing codecov
name: Unit Test ClientRuntime | ||
working_directory: ~/project/smithy-swift/ClientRuntime | ||
command: | | ||
xcodebuild test-without-building -enableCodeCoverage YES -project ClientRuntime.xcodeproj -scheme ClientRuntime -sdk iphonesimulator -destination "${destination}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This saves considerable amount of time as the test files are built during the previous step build-for-testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good thinking love it. if build fails it never gets to this step right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
filters: | ||
branches: | ||
only: | ||
- swift-client-runtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently only configured for this branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will change when we move repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes also when we move this to master branch
analyzer_rules: | ||
- unused_import | ||
- unused_declaration | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rules are same as the ones used in amplify-ios
project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same linter too right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. Swift community seems to be unanimously accepting https://github.com/realm/SwiftLint
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
shellPath = /bin/sh; | ||
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: Recommended to install SwiftLint, download from https://github.com/realm/SwiftLint\"\nfi\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swiftlint is now build in to the build process if the executable is present in the host machine. Else this step is skipped.
@@ -0,0 +1,32 @@ | |||
# Create sim if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: sim -> simulator ( we have another tool called sim so just to avoid confusion)
coverage: | ||
precision: 2 | ||
round: down | ||
range: "60...100" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this 80 please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just used to color code the graph, 60 is dark red. Right now the ClientRuntime has ~65% (excluding the tests folder).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah gotcha okay leave as is then! thanks for the clarification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only very small changes, very nice work overall!
) * add: migrate clientruntime mvp work * build fixes * add: unit tests for networking part of clientruntime and related changes in source code * fix: minor test setup fixes * delete: mqtt protocol related drafts * fix: moving data extensions from tests to main target * feat: add unit tests for Request/Response Encoding/Decoding * add: XMLContainer tests to improve codecov * fix: rename request/response protocol methods to encode/decode; minor nits * Swift client runtime circleci setup (#25) chore: add swiftLint and codecov tooling to swift ClientRuntime * feat(codegen): adding swift protocol generation and tests * feat(codegen): adding swift protocol generation and tests * style(codegen): fixed ktlint issues * test: fix tests to separate out pieces of protocol * style(codegen): fix ktlint errors one last time i hope * feat: add package manifest file generator * feat: tools support to test code generated sdk builds * fix: linting fixes * fix: use exec task instead of custom task for building generated sdk; minor formatting * fix: replace 'command' with 'which' * feat: use macos image for swift CI/CD workflow * fix: minor yml error * fix: generate xcodeproject before building clientruntime * fix: add swiftlint job * fix: xcode scheme as generated by SPM * fix: swiftlint job working directory change * fix: using new cache key * fix: move swiftVersion to swiftSettings * fix: dependecies available as pods and swift packages have empty package type * feat(client-runtime): add formatted dates * fix: epoch spelling correction * fix: add test for approach2 using coding keys * fix: using a generic AWSDate in place of multiple structs for each formatted date * fix: remove unrelated comment * fix: change wrapped date to let constant AWSDate * fix: DateFormatterProtocol related changes * fix: minor syntax change for loop * add: http bindings draft * fix: revert encodeForOperationName approach * fix: replace HttpSerialize With HttpRequestBinding, Let Encoders handle HttpRequest encoding * fix: using HttpFeature for serialization provider dependency; updated tests * fix: linting clientruntime * fix: kotlin linting fixes * fix: formatting * fix: refactor getSanitizedName method, remove Default prefix from client name * fix: fixing minor errors discovered in compile time * feat: add timestamp format handling for headers/query items * fix: add unit tests covering timestamp and enum cases * fix: kt linting * fix: remove explicit type declarations for path and httpmethod swift objects * fix: add query literals and default dateEncodingStrategy * feat: add RequestTestBase * feat: add request test base * feat: add tests for request test base * fix:(crt) move smithy unit test utility functions to a separate target * fix(crt): remove mock http client setup * fix: minor style changes * fix: remove AWSDate custom type: to be handled using custom Encodable/Decodable implementations * fix: remove custom AWSDates from Timestamp shape codegen * fix: linting changes only * fix: minor argument optional type fix * fix: add todo for structure geenrator error generation * feat(smithy-swift): add Request Unit test generators * feat(swift-codegen):add http protocol request unit test generator * fix: kt linting fixes only * fix: unit test for package manifest to include testTarget * feat(codegen): encodable conformance (#51) * fix compiler errors * saving progress * saving work down to 150 compiler errors * adding default input and output shapes for every operation for sdk evolution * protocol conformance in separate files now for models * started encode generation * saving progress * saving encode implementation progress * fixed a buttload of things and encode implementation is now working properly * one more bug fix taking us down to 89 compiler errors * feat(codegen): encodes types correctly * style(codegen): fix ktlint errors * fix(codegen): all tests pass * style(codegen): fix ktlint errors * fix(codegen): address PR Comments * fix(codegen): address PR comments, refactor encoding now that traits are back * fix(codegen): several fixes * fix(codegen): fix a lot of unit test compile errors * fix(codegen): fix remaining unit test compile errors and fix some encoding bugs 25 out of 43 tests passing now * fix(codegen): refactor http request bidning to include encoding * fix(codegen): down to 8 failing unit tests * fix(codegen): down to 4 failing unit tests * fix(codegen): down to 1 failing unit test which is idempotency * fix(codegen): some clean up and style changes * fix(codegen): small cleanup comment change * fix(codegen): undo change previously made in error * feat(codegen): Decodable Implementation & Recursive Shapes (#56) * fix(codegen): fixed generation of recursive shapes mostly and started decode implementation * feat(codegen): handle recursive shapes and unions * feat(codegen): add union handling * feat(codegen): decodes primitives, structs, and recursive members correctly, maps and collections still unhandled * feat(codegen): decodes collections of timestamps now * feat(codegen): decodes collections of everything no bugs and began work on maps * feat(codegen): maps and nested maps working now * feat(codegen): fixed one date compiler error * feat(codegen): all tests passing and all edge cases handled * fix(codegen): some clean up * style(codegen): fix lint issues * feat: add response test generation and init from HttpResponse * fix: add response test generation tests * fix: minor linting issue * fix: minor refactoring of variable/function names * fix: work on recursive shapes * fix: compiler error fixes after merge and unit tests are running now * fix: ShapeValueGenerator should return nil for null value in maps * fix: deserialize http payloads working now * fix: fix for initializer bug * fix: fix number 2 * fix: timestamp decoding fix * fix: timestamp issues fixed * fix: fix deserialization of lists * fix: base64 encoded header and dateEncodingStrategy for Encoder * fix: fixed query issue with timestamps * style(codegen): fix lint issues * fix: code review changes * fix: refactor http bindings protocol, client runtime Box type, stylistic changes, etc * fix: removing duplication of protocol conformance from box type * fix: refactoring http bindings protocol to move var declaration to a more needed spot Co-authored-by: phani-srikar <[email protected]> Co-authored-by: Phani Srikar Edupuganti <[email protected]> * fix(swift-crt): rename Operation error to Service Error * feat: Add error shape deserialization * feat: add errors unit test generation * fix: documentation comments update * fix: compile error for generated code; equality for ClientErrors * fix: structure members names to always have lowercased first letter * fix: modify coding keys to handle member name changes for a structure * fix: remove commented code * fix: Render Codable COnformance for Union Shapes * feat: add tests for union encode/decode generators * fix: minor nits * Fix ShapeValueGenerator for recursive shapes * Recursive shapes * styling code * Recursive shapes response generator unit test added * revert hardcoded absolute path * Recursive shapes unit added to ShapeValueGeneratorTest.kt * styling for unit test file * comments added in ShapeValueGenerator * feat(smithy-swift): Big Number Support * feat: reverting the path changes * styling: with ktlintFormat * feat: changed the import from BigNumber to Numerics * feat: changed the import from Numerics to ComplexModule * feat: BigNumber and BigDecimal are mapped to signed Int64 and Complex<Double> of Swift respectively * feat: used the bigdecimal datatype in kotlin for node.value and added unit test * styling: with ktlintFormat * feat(clientruntime): Refactor Client Runtime to use CRT Bindings (#63) * feat(clientruntime): started import of crt bindings as a dependency * feat(clientruntime): changes to spm set up * fix(clientruntime): fix changes and remove url session files * feat(clientruntime): updated with crt wrapper now * fix: remove warnings * feat(clientruntime): saving integ test progress * fix: saving progress and finally making requests to crt bindings that work * fix: sdk compile issues from refactoring changes * fix: fix unit tests * fix: address PR comments from Aaron, mostly add TODOs and documentation * fix: changed name of asyncrequest to be sdkhttprequest and fixed one bug all tests still passing * fix: ImportDeclarationsTest fixed * feat: temporary placeholder for smithy's bigInteger is [UInt8] in Smithy * fix: ImportDeclarationsTest and SymbolProviderTest are fixed * fix: retrieving dependencies needed for package.swift from distinctDependencies array * fix: ktlintFormat fix * feat: extracting all values from distinctDependencies array which gets loaded from SwiftDependency.kt * fix: ktlintFormat corrected * fix: cleaned up commented code * Changed config.yml to clone aws-crt-swift repo in circleci * config.yml change with git clone early * config.yml in different way * clone before Generate XCodeProject * git clone aws-crt-swift repo during pre_start_ios_simulator step * config.yml: create dir, cd, clone and cd- * config.yml change to clone the futures-implementation branch of aws-crt-swift repo * added submodule update in config.yml * edited the submodule init --recursive after cd into aws-crt-swift * submodule with git clone * removed -project from xcodebuild and removed swift package generate-xcodeproj * edited destination and changed xcodebuild command * xcode version change * fix: swift isses * xcodebuild test command change * fix unit test * linting fixes * fix: address linting violations * fix build issue resulting from linter autocorrect * fix: fix the unit test bug again * fix headers bug again * fix path so it works in generated code build * add clone of crt to build smithy swift step * removed smithy-kotlin repo * fix: path for aws-crt-swift fixed * cloning the aws-crt-swift repo from master * cloning the aws-crt-swift repo from master for unit test as well * moved the content of smithy-swift to root and deleted smithy-swift directory * fix in config.yml * ktlintFormat fixed manually * fix: Build ClientRuntime path issue * reverted Build ClientRuntime path * fix: deleting the xcode cache * submodule init as a separate step * deleting the derivedData before cloning aws-crt-swift * deleted ClientRuntime.xcodeproj * fix: imports in smithy-swift * reverted to old clone config.yml * imports fixed for ktlint * ktlint fix in smithy-swift-codegen Co-authored-by: phani-srikar <[email protected]> Co-authored-by: Nicki Stone <[email protected]> Co-authored-by: phani-srikar <[email protected]> Co-authored-by: Nicki Stone <[email protected]> Co-authored-by: Adireddy <[email protected]>
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.