Skip to content

Draft: [trello.com/c/8pjgw6a9] Moved Local Authentication Service to async/await #670

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .githooks/pre-commit-formatter
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Get only files that are staged and have changes in the index (excluding unstaged changes)
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(swift)$')

if [ -n "$STAGED_FILES" ]; then
echo "Formatting staged files..."
echo "$STAGED_FILES" | while read -r file; do
scripts/AdamantCLI/adamant-cli format staged "$file"
git add "$file"
done
else
echo "No staged files to format."
fi

exit 0
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: run tests

on:
workflow_call:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_type != 'tag' }}

jobs:
run_tests:
runs-on: macos-15
steps:
- name: Set Xcode 16.2.0
run: sudo xcode-select -s /Applications/Xcode_16.2.0.app/Contents/Developer
- name: Print Current Xcode
run: xcode-select -p
- uses: actions/checkout@v3
- name: Build adamant-cli
run: make configure
- name: Setup project dependencies
run: ./scripts/AdamantCLI/adamant-cli setup
- name: Pod Install
run: pod install
- name: Generate mocks for tests
run: ./scripts/AdamantCLI/adamant-cli mocks
- name: Run tests
run: xcodebuild test -workspace Adamant.xcworkspace -scheme Adamant.Dev -destination 'platform=iOS Simulator,name=iPhone 16' | xcbeautify


4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ xcuserdata/
*.moved-aside
*.xccheckout
*.xcscmblueprint
.idea/

### Xcode Patch ###
*.xcodeproj/*
Expand All @@ -109,3 +110,6 @@ runkit ex.rtf
to do.rtf
tz.rtf
profiles
Generated/
.swiftpm/
adamant-cli
20 changes: 20 additions & 0 deletions .sourcery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
sources:
- ./Adamant/
- ./CommonKit/
- ./BitcoinKit/
templates:
- ./Templates/sourcery/Mock.swifttemplate
output:
path: ./AdamantTests/Stubs/Generated/
args:
import:
- CommonKit
- CoreData
- XCTest
- Alamofire
- BitcoinKit
- LiskKit
testable:
- Adamant
- SwiftyMocky
- SwiftyMockyXCTest
70 changes: 70 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"fileScopedDeclarationPrivacy" : {
"accessLevel" : "private"
},
"indentConditionalCompilationBlocks" : true,
"indentSwitchCaseLabels" : false,
"indentation" : {
"spaces" : 4
},
"lineBreakAroundMultilineExpressionChainComponents" : false,
"lineBreakBeforeControlFlowKeywords" : false,
"lineBreakBeforeEachArgument" : true,
"lineBreakBeforeEachGenericRequirement" : false,
"lineLength" : 160,
"maximumBlankLines" : 1,
"multiElementCollectionTrailingCommas" : false,
"noAssignmentInExpressions" : {
"allowedFunctions" : [
"XCTAssertNoThrow"
]
},
"prioritizeKeepingFunctionOutputTogether" : true,
"respectsExistingLineBreaks" : true,
"rules" : {
"AllPublicDeclarationsHaveDocumentation" : false,
"AlwaysUseLiteralForEmptyCollectionInit" : false,
"AlwaysUseLowerCamelCase" : true,
"AmbiguousTrailingClosureOverload" : true,
"BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true,
"FileScopedDeclarationPrivacy" : true,
"FullyIndirectEnum" : true,
"GroupNumericLiterals" : true,
"IdentifiersMustBeASCII" : true,
"NeverForceUnwrap" : false,
"NeverUseForceTry" : false,
"NeverUseImplicitlyUnwrappedOptionals" : false,
"NoAccessLevelOnExtensionDeclaration" : true,
"NoAssignmentInExpressions" : true,
"NoBlockComments" : true,
"NoCasesWithOnlyFallthrough" : true,
"NoEmptyTrailingClosureParentheses" : true,
"NoLabelsInCasePatterns" : true,
"NoLeadingUnderscores" : false,
"NoParensAroundConditions" : true,
"NoPlaygroundLiterals" : true,
"NoVoidReturnOnFunctionSignature" : true,
"OmitExplicitReturns" : false,
"OneCasePerLine" : true,
"OneVariableDeclarationPerLine" : true,
"OnlyOneTrailingClosureArgument" : true,
"OrderedImports" : true,
"ReplaceForEachWithForLoop" : true,
"ReturnVoidInsteadOfEmptyTuple" : true,
"TypeNamesShouldBeCapitalized" : true,
"UseEarlyExits" : false,
"UseExplicitNilCheckInConditions" : true,
"UseLetInEveryBoundCaseVariable" : true,
"UseShorthandTypeNames" : true,
"UseSingleLinePropertyGetter" : true,
"UseSynthesizedInitializer" : true,
"UseTripleSlashForDocumentationComments" : true,
"UseWhereClausesInForLoops" : false,
"ValidateDocumentationComments" : false
},
"spacesAroundRangeFormationOperators" : false,
"tabWidth" : 8,
"version" : 1
}
Loading