Skip to content
Snippets Groups Projects
Commit 3a9678fe authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Merge branch 'development' into dev/macos-support

# Conflicts:
#	run-tests.sh
parents a8447657 e6a4c9c6
No related branches found
No related tags found
1 merge request!45Draft: Add macOS support
stages: stages:
- test - test
tests: package-tests:
stage: test stage: test
tags: tags:
- ios - ios
script: script:
- ./run-tests.sh - ./run-tests.sh
examples-tests:
stage: test
tags:
- ios
script:
- ./run-tests.sh examples
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = P38XW29864; DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = pl.darrarski.XXMessenger; PRODUCT_BUNDLE_IDENTIFIER = xx.network.XXMessengerExample;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = P38XW29864; DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = pl.darrarski.XXMessenger; PRODUCT_BUNDLE_IDENTIFIER = xx.network.XXMessengerExample;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
......
...@@ -44,7 +44,9 @@ extension AppEnvironment { ...@@ -44,7 +44,9 @@ extension AppEnvironment {
}, },
home: { home: {
HomeEnvironment( HomeEnvironment(
messenger: messenger messenger: messenger,
mainQueue: mainQueue,
bgQueue: bgQueue
) )
} }
) )
......
...@@ -12,17 +12,25 @@ public enum HomeAction: Equatable { ...@@ -12,17 +12,25 @@ public enum HomeAction: Equatable {
public struct HomeEnvironment { public struct HomeEnvironment {
public init( public init(
messenger: Messenger messenger: Messenger,
mainQueue: AnySchedulerOf<DispatchQueue>,
bgQueue: AnySchedulerOf<DispatchQueue>
) { ) {
self.messenger = messenger self.messenger = messenger
self.mainQueue = mainQueue
self.bgQueue = bgQueue
} }
public var messenger: Messenger public var messenger: Messenger
public var mainQueue: AnySchedulerOf<DispatchQueue>
public var bgQueue: AnySchedulerOf<DispatchQueue>
} }
extension HomeEnvironment { extension HomeEnvironment {
public static let unimplemented = HomeEnvironment( public static let unimplemented = HomeEnvironment(
messenger: .unimplemented messenger: .unimplemented,
mainQueue: .unimplemented,
bgQueue: .unimplemented
) )
} }
......
#!/bin/sh #!/bin/sh
set -e set -e
echo "\n\033[1;32m▶ Running tests on iOS Simulator...\033[0m" if [ ! -n "$1" ]; then
set -o pipefail && xcodebuild -scheme 'elixxir-dapps-sdk-swift-Package' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13' test | ./xcbeautify
echo "\n\033[1;32m▶ Running tests on macOS...\033[0m" echo "\n\033[1;32m▶ Running package tests on macOS...\033[0m"
set -o pipefail && swift test 2>&1 | ./xcbeautify set -o pipefail && swift test 2>&1 | ./xcbeautify
echo "\n\033[1;32m▶ Running package tests on iOS Simulator...\033[0m"
set -o pipefail && xcodebuild -scheme 'elixxir-dapps-sdk-swift-Package' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13' test | ./xcbeautify
elif [ "$1" = "examples" ]; then
echo "\n\033[1;32m▶ Running XXMessenger example tests on iOS Simulator...\033[0m"
set -o pipefail && xcodebuild -workspace 'Examples/xx-messenger/XXMessenger.xcworkspace' -scheme 'XXMessenger' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13' test | ./xcbeautify
else
echo "Invalid option. Usage:"
echo " run-tests.sh - Run package tests"
echo " run-tests.sh examples - Run examples tests"
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment