Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .buildkite/build-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -eu

# We need to use a script as opposed to calling `build_and_test_pod` inline in
# the pipeline via the `command` node because our CI-VM setup doesn't forward
# the environment in that mode.

# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler

build_and_test_pod
11 changes: 4 additions & 7 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#2.0.0: ~
env: &common_env
IMAGE_ID: xcode-13
IMAGE_ID: xcode-13.4.1

# This is the default pipeline – it will build and test the pod
steps:
Expand All @@ -12,10 +12,7 @@ steps:
#################
- label: "🧪 Build and Test"
key: "test"
command: |
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4
build_and_test_pod
command: .buildkite/build-and-test.sh
env: *common_env
plugins: *common_plugins

Expand All @@ -26,7 +23,7 @@ steps:
key: "validate"
command: |
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4
gem install bundler
validate_podspec
env: *common_env
plugins: *common_plugins
Expand All @@ -38,7 +35,7 @@ steps:
key: "lint"
command: |
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
gem install bundler:2.3.4
gem install bundler
lint_pod
env: *common_env
plugins: *common_plugins
Expand Down
90 changes: 77 additions & 13 deletions WordPressAuthenticator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
020BE74A23B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020BE74923B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift */; };
1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A21EE9722832BC200C940C6 /* WordPressComOAuthClientFacade+Swift.swift */; };
1A4095182271AEFC009AA86D /* WPAuthenticator-Swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4095152271AEFC009AA86D /* WPAuthenticator-Swift.h */; settings = {ATTRIBUTES = (Private, ); }; };
3108613125AFA4830022F75E /* PasteboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3108613025AFA4830022F75E /* PasteboardTests.swift */; };
3F338B6A289B877F0014ADC5 /* BuildkiteTestCollector in Frameworks */ = {isa = PBXBuildFile; productRef = 3F338B69289B877F0014ADC5 /* BuildkiteTestCollector */; };
3F550D4E23DA429B007E5897 /* AppSelectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F550D4D23DA429B007E5897 /* AppSelectorTests.swift */; };
3F550D5123DA4A9C007E5897 /* LinkMailPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F550D5023DA4A9C007E5897 /* LinkMailPresenter.swift */; };
3F550D5323DA4AC6007E5897 /* URLHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F550D5223DA4AC6007E5897 /* URLHandler.swift */; };
Expand Down Expand Up @@ -212,6 +213,7 @@
3108613025AFA4830022F75E /* PasteboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasteboardTests.swift; sourceTree = "<group>"; };
33FEF45B466FF8EAAE5F3923 /* Pods-WordPressAuthenticator.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressAuthenticator.release.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressAuthenticator/Pods-WordPressAuthenticator.release.xcconfig"; sourceTree = "<group>"; };
37AFD4EF492B00CA7AEC11A3 /* Pods-WordPressAuthenticatorTests.release-alpha.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressAuthenticatorTests.release-alpha.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressAuthenticatorTests/Pods-WordPressAuthenticatorTests.release-alpha.xcconfig"; sourceTree = "<group>"; };
3F338B6B289B87E60014ADC5 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = "<group>"; };
3F550D4D23DA429B007E5897 /* AppSelectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSelectorTests.swift; sourceTree = "<group>"; };
3F550D5023DA4A9C007E5897 /* LinkMailPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkMailPresenter.swift; sourceTree = "<group>"; };
3F550D5223DA4AC6007E5897 /* URLHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLHandler.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -402,6 +404,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3F338B6A289B877F0014ADC5 /* BuildkiteTestCollector in Frameworks */,
B5ED78FE207E976500A8FD8C /* WordPressAuthenticator.framework in Frameworks */,
E8AF6B9EF50902F2117DFAF9 /* Pods_WordPressAuthenticatorTests.framework in Frameworks */,
);
Expand Down Expand Up @@ -770,6 +773,7 @@
B501C03F208FC52500D1E58F /* Services */,
3F550D4C23DA4191007E5897 /* UI */,
B5ED7904207E976500A8FD8C /* Info.plist */,
3F338B6B289B87E60014ADC5 /* UnitTests.xctestplan */,
);
path = WordPressAuthenticatorTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -964,9 +968,9 @@
buildConfigurationList = B5ED7908207E976500A8FD8C /* Build configuration list for PBXNativeTarget "WordPressAuthenticator" */;
buildPhases = (
6CD6648B820552D8638F8EDA /* [CP] Check Pods Manifest.lock */,
B5ED78F1207E976500A8FD8C /* Headers */,
B5ED78EF207E976500A8FD8C /* Sources */,
B5ED78F0207E976500A8FD8C /* Frameworks */,
B5ED78F1207E976500A8FD8C /* Headers */,
B5ED78F2207E976500A8FD8C /* Resources */,
B5A5274B20B479D30065BE81 /* CopyFiles */,
);
Expand Down Expand Up @@ -995,6 +999,9 @@
B5ED7900207E976500A8FD8C /* PBXTargetDependency */,
);
name = WordPressAuthenticatorTests;
packageProductDependencies = (
3F338B69289B877F0014ADC5 /* BuildkiteTestCollector */,
);
productName = WordPressAuthenticatorTests;
productReference = B5ED78FD207E976500A8FD8C /* WordPressAuthenticatorTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
Expand Down Expand Up @@ -1030,6 +1037,9 @@
Base,
);
mainGroup = B5ED78EA207E976500A8FD8C;
packageReferences = (
3F338B66289B87650014ADC5 /* XCRemoteSwiftPackageReference "test-collector-swift" */,
);
productRefGroup = B5ED78F5207E976500A8FD8C /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -1438,7 +1448,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -1459,7 +1470,11 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.21.0;
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -1483,7 +1498,11 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.21.0;
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -1501,7 +1520,11 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = PZYM8XX95Q;
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
Expand All @@ -1519,7 +1542,11 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = PZYM8XX95Q;
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
Expand Down Expand Up @@ -1579,7 +1606,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -1600,7 +1628,11 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.21.0;
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -1618,7 +1650,11 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = PZYM8XX95Q;
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
Expand Down Expand Up @@ -1678,7 +1714,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -1699,7 +1736,11 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.21.0;
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand All @@ -1717,7 +1758,11 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = PZYM8XX95Q;
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
Expand Down Expand Up @@ -1764,6 +1809,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
3F338B66289B87650014ADC5 /* XCRemoteSwiftPackageReference "test-collector-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/buildkite/test-collector-swift";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.3.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
3F338B69289B877F0014ADC5 /* BuildkiteTestCollector */ = {
isa = XCSwiftPackageProductDependency;
package = 3F338B66289B87650014ADC5 /* XCRemoteSwiftPackageReference "test-collector-swift" */;
productName = BuildkiteTestCollector;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = B5ED78EB207E976500A8FD8C /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down Expand Up @@ -37,6 +37,12 @@
ReferencedContainer = "container:WordPressAuthenticator.xcodeproj">
</BuildableReference>
</MacroExpansion>
<TestPlans>
<TestPlanReference
reference = "container:WordPressAuthenticatorTests/UnitTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions WordPressAuthenticatorTests/UnitTests.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"configurations" : [
{
"id" : "D97A5016-3F23-4D19-9CEB-C10A9AC3591F",
"name" : "Configuration 1",
"options" : {

}
}
],
"defaultOptions" : {
"environmentVariableEntries" : [
{
"key" : "BUILDKITE_ANALYTICS_TOKEN",
"value" : "$(BUILDKITE_ANALYTICS_TOKEN)"
},
{
"key" : "BUILDKITE_BRANCH",
"value" : "$(BUILDKITE_BRANCH)"
},
{
"key" : "BUILDKITE_BUILD_ID",
"value" : "$(BUILDKITE_BUILD_ID)"
},
{
"key" : "BUILDKITE_BUILD_NUMBER",
"value" : "$(BUILDKITE_BUILD_NUMBER)"
},
{
"key" : "BUILDKITE_BUILD_URL",
"value" : "$(BUILDKITE_BUILD_URL)"
},
{
"key" : "BUILDKITE_COMMIT",
"value" : "$(BUILDKITE_COMMIT)"
},
{
"key" : "BUILDKITE_JOB_ID",
"value" : "$(BUILDKITE_JOB_ID)"
},
{
"key" : "BUILDKITE_MESSAGE",
"value" : "$(BUILDKITE_MESSAGE)"
}
],
"targetForVariableExpansion" : {
"containerPath" : "container:WordPressAuthenticator.xcodeproj",
"identifier" : "B5ED78F3207E976500A8FD8C",
"name" : "WordPressAuthenticator"
},
"testTimeoutsEnabled" : true
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:WordPressAuthenticator.xcodeproj",
"identifier" : "B5ED78FC207E976500A8FD8C",
"name" : "WordPressAuthenticatorTests"
}
}
],
"version" : 1
}