Run tests on PR (#241)

This commit is contained in:
Davide De Rosa 2022-10-30 11:53:53 +01:00 committed by GitHub
parent 22c28de641
commit aca431aac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 515 additions and 30 deletions

View File

@ -1,7 +1,6 @@
MATCH_TYPE="appstore"
GYM_EXPORT_METHOD="app-store"
GYM_SKIP_PACKAGE_PKG="false"
SCAN_PACKAGE_PATH="PassepartoutLibrary"
DEMO_ACCOUNT_REQUIRED="true"
PILOT_DISTRIBUTE_EXTERNAL="true"
PILOT_BETA_APP_DESCRIPTION="Passepartout is a user-friendly VPN client."

View File

@ -1,7 +1,6 @@
INFO_PLIST_ROOT="Passepartout/App"
MATCH_PLATFORM="ios"
GYM_SCHEME="Passepartout"
SCAN_DEVICE="iPhone 12"
DELIVER_PLATFORM="ios"
DELIVER_METADATA_PATH="Passepartout/App/fastlane/ios/metadata"
DELIVER_SCREENSHOTS_PATH="Passepartout/App/fastlane/ios/screenshots"

View File

@ -3,9 +3,6 @@ MATCH_PLATFORM="catalyst"
MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
GYM_SCHEME="Passepartout"
GYM_CATALYST_PLATFORM="macos"
# not sure about these
SCAN_DESTINATION="platform=iOS"
DELIVER_PLATFORM="osx"
DELIVER_METADATA_PATH="Passepartout/App/fastlane/mac/metadata"
DELIVER_SCREENSHOTS_PATH="Passepartout/App/fastlane/mac/screenshots"

View File

@ -1,22 +1,18 @@
name: Unit Tests
on:
push:
branches-ignore:
- 'master' # temporary
- 'test/*'
pull_request:
types: [ opened, synchronize ]
paths-ignore:
- '.beta-*'
- 'Passepartout.xcodeproj/project.pbxproj'
- '**/Info.plist'
- '**/CHANGELOG.md'
- '**/release_notes.txt'
- '**/*.md'
- 'Passepartout/App/fastlane/**'
jobs:
run_tests:
name: Run tests
runs-on: macos-12
timeout-minutes: 20
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
with:
@ -24,7 +20,12 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-go@v3
with:
go-version: "^1.17"
- name: Run tests
run: |
cd PassepartoutLibrary
swift test
bundle exec fastlane --env beta,ios scan

View File

@ -133,6 +133,8 @@
0EA1D84728805EAE00F3CA48 /* Flags.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0EA1D84628805EAE00F3CA48 /* Flags.xcassets */; };
0EA591162733DDDA0096F796 /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 0EA591142733DDDA0096F796 /* Intents.intentdefinition */; };
0EA9030B287045F70087BC73 /* SystemMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EA9030A287045F70087BC73 /* SystemMenu.swift */; };
0EB13BBE290E835A003CB654 /* PassepartoutLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 0EB13BBD290E835A003CB654 /* PassepartoutLibrary */; };
0EB13BC0290E8C8D003CB654 /* PassepartoutTestsApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EB13BBF290E8C8D003CB654 /* PassepartoutTestsApp.swift */; };
0EB17EA727D226B400D473B5 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EB17EA127D2263700D473B5 /* Constants.swift */; };
0EB17EA927D226C900D473B5 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EB17EA127D2263700D473B5 /* Constants.swift */; };
0EB17EAA27D226C900D473B5 /* Constants+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EB17EA527D2263700D473B5 /* Constants+App.swift */; };
@ -201,6 +203,13 @@
remoteGlobalIDString = 0E41BD96286711C3006346B4;
remoteInfo = PassepartoutLauncher;
};
0EB13BBB290E82F1003CB654 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0E57F63020C83FC5008323CF /* Project object */;
proxyType = 1;
remoteGlobalIDString = 0ECF71F327B6D9CD00CDB528;
remoteInfo = WireGuardGo;
};
0EB2B1492733FB6F007705AB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0E57F63020C83FC5008323CF /* Project object */;
@ -425,6 +434,8 @@
0EA5912C2733DDFC0096F796 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Intents.strings; sourceTree = "<group>"; };
0EA5912E2733DDFD0096F796 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Intents.strings; sourceTree = "<group>"; };
0EA9030A287045F70087BC73 /* SystemMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemMenu.swift; sourceTree = "<group>"; };
0EB13BAC290E825E003CB654 /* PassepartoutTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PassepartoutTests.app; sourceTree = BUILT_PRODUCTS_DIR; };
0EB13BBF290E8C8D003CB654 /* PassepartoutTestsApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PassepartoutTestsApp.swift; sourceTree = "<group>"; };
0EB17EA127D2263700D473B5 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
0EB17EA327D2263700D473B5 /* LocalProduct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalProduct.swift; sourceTree = "<group>"; };
0EB17EA527D2263700D473B5 /* Constants+App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Constants+App.swift"; sourceTree = "<group>"; };
@ -510,6 +521,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
0EB13BA9290E825E003CB654 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0EB13BBE290E835A003CB654 /* PassepartoutLibrary in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0ECB78D7285F52F700B0E460 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -755,6 +774,7 @@
0EE315DB2733104700F5D461 /* Packages */,
0E23B4A12298559800304C30 /* Config.xcconfig */,
0E9AA982259F7674003FAFF1 /* Passepartout */,
0EB13BAD290E825E003CB654 /* PassepartoutTests */,
0E57F63920C83FC5008323CF /* Products */,
374B9F085E1148C37CF9117A /* Frameworks */,
);
@ -768,6 +788,7 @@
0ED2B34A27D3C77800FD8EA9 /* PassepartoutWireGuardTunnel.appex */,
0E41BD97286711C3006346B4 /* PassepartoutLauncher.app */,
0ECB78DA285F52F700B0E460 /* PassepartoutMac.bundle */,
0EB13BAC290E825E003CB654 /* PassepartoutTests.app */,
);
name = Products;
sourceTree = "<group>";
@ -863,6 +884,14 @@
path = Intents;
sourceTree = "<group>";
};
0EB13BAD290E825E003CB654 /* PassepartoutTests */ = {
isa = PBXGroup;
children = (
0EB13BBF290E8C8D003CB654 /* PassepartoutTestsApp.swift */,
);
path = PassepartoutTests;
sourceTree = "<group>";
};
0ECB78D1285F4F4000B0E460 /* AppShared */ = {
isa = PBXGroup;
children = (
@ -1031,6 +1060,27 @@
productReference = 0E57F63820C83FC5008323CF /* Passepartout.app */;
productType = "com.apple.product-type.application";
};
0EB13BAB290E825E003CB654 /* PassepartoutTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0EB13BBA290E8260003CB654 /* Build configuration list for PBXNativeTarget "PassepartoutTests" */;
buildPhases = (
0EB13BA8290E825E003CB654 /* Sources */,
0EB13BA9290E825E003CB654 /* Frameworks */,
0EB13BAA290E825E003CB654 /* Resources */,
);
buildRules = (
);
dependencies = (
0EB13BBC290E82F1003CB654 /* PBXTargetDependency */,
);
name = PassepartoutTests;
packageProductDependencies = (
0EB13BBD290E835A003CB654 /* PassepartoutLibrary */,
);
productName = PassepartoutTests;
productReference = 0EB13BAC290E825E003CB654 /* PassepartoutTests.app */;
productType = "com.apple.product-type.application";
};
0ECB78D9285F52F700B0E460 /* PassepartoutMac */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0ECB78DD285F52F700B0E460 /* Build configuration list for PBXNativeTarget "PassepartoutMac" */;
@ -1097,7 +1147,7 @@
0E57F63020C83FC5008323CF /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1340;
LastSwiftUpdateCheck = 1400;
LastUpgradeCheck = 1400;
ORGANIZATIONNAME = "Davide De Rosa";
TargetAttributes = {
@ -1122,6 +1172,10 @@
};
};
};
0EB13BAB290E825E003CB654 = {
CreatedOnToolsVersion = 14.0.1;
LastSwiftMigration = 1400;
};
0ECB78D9285F52F700B0E460 = {
CreatedOnToolsVersion = 13.4;
LastSwiftMigration = 1340;
@ -1173,6 +1227,7 @@
0E57F63720C83FC5008323CF /* Passepartout */,
0ECB78D9285F52F700B0E460 /* PassepartoutMac */,
0E41BD96286711C3006346B4 /* PassepartoutLauncher */,
0EB13BAB290E825E003CB654 /* PassepartoutTests */,
0EDE8DBE20C86910004C739C /* OpenVPNTunnel */,
0ECF71F327B6D9CD00CDB528 /* WireGuardGo */,
0ED2B33E27D3C77800FD8EA9 /* WireGuardTunnel */,
@ -1203,6 +1258,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
0EB13BAA290E825E003CB654 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
0ECB78D8285F52F700B0E460 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -1431,6 +1493,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
0EB13BA8290E825E003CB654 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0EB13BC0290E8C8D003CB654 /* PassepartoutTestsApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0ED2B34027D3C77800FD8EA9 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -1459,6 +1529,11 @@
target = 0E41BD96286711C3006346B4 /* PassepartoutLauncher */;
targetProxy = 0E41BDAA286713F6006346B4 /* PBXContainerItemProxy */;
};
0EB13BBC290E82F1003CB654 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 0ECF71F327B6D9CD00CDB528 /* WireGuardGo */;
targetProxy = 0EB13BBB290E82F1003CB654 /* PBXContainerItemProxy */;
};
0EB2B14A2733FB6F007705AB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 0EDE8DBE20C86910004C739C /* OpenVPNTunnel */;
@ -1780,6 +1855,73 @@
};
name = Release;
};
0EB13BB8290E8260003CB654 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.algoritmico.ios.PassepartoutTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
0EB13BB9290E8260003CB654 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault;
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.algoritmico.ios.PassepartoutTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
0ECB78DB285F52F700B0E460 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -1996,6 +2138,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
0EB13BBA290E8260003CB654 /* Build configuration list for PBXNativeTarget "PassepartoutTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0EB13BB8290E8260003CB654 /* Debug */,
0EB13BB9290E8260003CB654 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
0ECB78DD285F52F700B0E460 /* Build configuration list for PBXNativeTarget "PassepartoutMac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@ -2051,6 +2202,10 @@
package = 0E53249B27D28FC7002565C3 /* XCRemoteSwiftPackageReference "Kvitto" */;
productName = Kvitto;
};
0EB13BBD290E835A003CB654 /* PassepartoutLibrary */ = {
isa = XCSwiftPackageProductDependency;
productName = PassepartoutLibrary;
};
0ECB78EB2863A21600B0E460 /* PassepartoutLibrary */ = {
isa = XCSwiftPackageProductDependency;
productName = PassepartoutLibrary;

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0EB13BAB290E825E003CB654"
BuildableName = "PassepartoutTests.app"
BlueprintName = "PassepartoutTests"
ReferencedContainer = "container:Passepartout.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutCoreTests"
BuildableName = "PassepartoutCoreTests"
BlueprintName = "PassepartoutCoreTests"
ReferencedContainer = "container:PassepartoutLibrary">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutLibraryTests"
BuildableName = "PassepartoutLibraryTests"
BlueprintName = "PassepartoutLibraryTests"
ReferencedContainer = "container:PassepartoutLibrary">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutProfilesTests"
BuildableName = "PassepartoutProfilesTests"
BlueprintName = "PassepartoutProfilesTests"
ReferencedContainer = "container:PassepartoutLibrary">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutProvidersTests"
BuildableName = "PassepartoutProvidersTests"
BlueprintName = "PassepartoutProvidersTests"
ReferencedContainer = "container:PassepartoutLibrary">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutServicesTests"
BuildableName = "PassepartoutServicesTests"
BlueprintName = "PassepartoutServicesTests"
ReferencedContainer = "container:PassepartoutLibrary">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutUtilsTests"
BuildableName = "PassepartoutUtilsTests"
BlueprintName = "PassepartoutUtilsTests"
ReferencedContainer = "container:PassepartoutLibrary">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutVPNTests"
BuildableName = "PassepartoutVPNTests"
BlueprintName = "PassepartoutVPNTests"
ReferencedContainer = "container:PassepartoutLibrary">
</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">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0EB13BAB290E825E003CB654"
BuildableName = "PassepartoutTests.app"
BlueprintName = "PassepartoutTests"
ReferencedContainer = "container:Passepartout.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0EB13BAB290E825E003CB654"
BuildableName = "PassepartoutTests.app"
BlueprintName = "PassepartoutTests"
ReferencedContainer = "container:Passepartout.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PassepartoutLibrary"
BuildableName = "PassepartoutLibrary"
BlueprintName = "PassepartoutLibrary"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</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 = "PassepartoutLibrary"
BuildableName = "PassepartoutLibrary"
BlueprintName = "PassepartoutLibrary"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -89,15 +89,21 @@ let package = Package(
dependencies: [
.product(name: "TunnelKitWireGuardAppExtension", package: "TunnelKit")
]),
// .testTarget(
// name: "PassepartoutLibraryTests",
// dependencies: ["PassepartoutLibrary"]),
// .testTarget(
// name: "PassepartoutProfilesTests",
// dependencies: ["PassepartoutProfiles"]),
.testTarget(
name: "PassepartoutLibraryTests",
dependencies: ["PassepartoutLibrary"]),
.testTarget(
name: "PassepartoutVPNTests",
dependencies: ["PassepartoutVPN"]),
.testTarget(
name: "PassepartoutProfilesTests",
dependencies: ["PassepartoutProfiles"]),
.testTarget(
name: "PassepartoutProvidersTests",
dependencies: ["PassepartoutProviders"]),
.testTarget(
name: "PassepartoutCoreTests",
dependencies: ["PassepartoutCore"]),
.testTarget(
name: "PassepartoutServicesTests",
dependencies: ["PassepartoutServices"]),

View File

@ -3,7 +3,7 @@
// Passepartout
//
// Created by Davide De Rosa on 3/30/19.
// Copyright (c) 2020 Davide De Rosa. All rights reserved.
// Copyright (c) 2022 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//
@ -24,7 +24,7 @@
//
import XCTest
import PassepartoutLibrary
@testable import PassepartoutCore
class CoreTests: XCTestCase {
override func setUp() {
@ -33,4 +33,4 @@ class CoreTests: XCTestCase {
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
}
}

View File

@ -0,0 +1,36 @@
//
// LibraryTests.swift
// Passepartout
//
// Created by Davide De Rosa on 10/29/22.
// Copyright (c) 2022 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//
// This file is part of Passepartout.
//
// Passepartout is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Passepartout is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
//
import XCTest
@testable import PassepartoutLibrary
class LibraryTests: XCTestCase {
override func setUp() {
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
}

View File

@ -35,7 +35,7 @@ import SwiftyBeaver
class ProvidersTests: XCTestCase {
private static let persistence: Persistence = {
let model = NSManagedObjectModel.mergedModel(from: [.module])!
return Persistence(withLocalName: "Providers", model: model, author: nil)
return Persistence(withLocalName: "ProvidersTests", model: model, author: nil)
}()
private var manager: ProviderManager!

View File

@ -3,7 +3,7 @@
// Passepartout
//
// Created by Davide De Rosa on 6/11/18.
// Copyright (c) 2020 Davide De Rosa. All rights reserved.
// Copyright (c) 2022 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//

View File

@ -3,7 +3,7 @@
// Passepartout
//
// Created by Davide De Rosa on 3/30/19.
// Copyright (c) 2020 Davide De Rosa. All rights reserved.
// Copyright (c) 2022 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//
@ -24,7 +24,7 @@
//
import XCTest
import PassepartoutUtils
@testable import PassepartoutUtils
import SwiftyBeaver
class UtilsTests: XCTestCase {
@ -44,7 +44,10 @@ class UtilsTests: XCTestCase {
let languagesEN = privateSortedLanguages(languages, with: english)
let languagesIT = privateSortedLanguages(languages, with: italian)
// English, German, Italian, Portuguese, Russian
XCTAssertEqual(languagesEN, ["en", "de", "it", "pt-BR", "ru"])
// Inglese, Italiano, Portoghese, Russo, Tedesco
XCTAssertEqual(languagesIT, ["en", "it", "pt-BR", "ru", "de"])
}

View File

@ -0,0 +1,36 @@
//
// VPNTests.swift
// Passepartout
//
// Created by Davide De Rosa on 10/29/22.
// Copyright (c) 2022 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//
// This file is part of Passepartout.
//
// Passepartout is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Passepartout is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
//
import XCTest
@testable import PassepartoutVPN
class VPNTests: XCTestCase {
override func setUp() {
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
}

View File

@ -0,0 +1,35 @@
//
// PassepartoutTestsApp.swift
// Passepartout
//
// Created by Davide De Rosa on 10/30/22.
// Copyright (c) 2022 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//
// This file is part of Passepartout.
//
// Passepartout is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Passepartout is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
//
import SwiftUI
@main
struct PassepartoutTestsApp: App {
var body: some Scene {
WindowGroup {
EmptyView()
}
}
}

View File

@ -2,6 +2,7 @@
# For more information, check out the docs
# https://docs.fastlane.tools/actions/deliver/
automatic_release false
skip_binary_upload true
skip_metadata false
skip_screenshots false

2
fastlane/Scanfile Normal file
View File

@ -0,0 +1,2 @@
scheme "PassepartoutTests"
device "iPhone 14"