Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit b3bcb7f

Browse files
authored
Integrate Buildkite Test Analytics (#654)
2 parents 87fb1dd + 5dcde72 commit b3bcb7f

File tree

6 files changed

+175
-21
lines changed

6 files changed

+175
-21
lines changed

.buildkite/build-and-test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -eu
2+
3+
# We need to use a script as opposed to calling `build_and_test_pod` inline in
4+
# the pipeline via the `command` node because our CI-VM setup doesn't forward
5+
# the environment in that mode.
6+
7+
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
8+
gem install bundler
9+
10+
build_and_test_pod

.buildkite/pipeline.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ common_params:
33
plugins: &common_plugins
44
- &bash_cache automattic/bash-cache#2.0.0: ~
55
env: &common_env
6-
IMAGE_ID: xcode-13
6+
IMAGE_ID: xcode-13.4.1
77

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

@@ -26,7 +23,7 @@ steps:
2623
key: "validate"
2724
command: |
2825
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
29-
gem install bundler:2.3.4
26+
gem install bundler
3027
validate_podspec
3128
env: *common_env
3229
plugins: *common_plugins
@@ -38,7 +35,7 @@ steps:
3835
key: "lint"
3936
command: |
4037
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
41-
gem install bundler:2.3.4
38+
gem install bundler
4239
lint_pod
4340
env: *common_env
4441
plugins: *common_plugins

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 77 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 48;
6+
objectVersion = 52;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
020BE74A23B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020BE74923B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift */; };
1111
1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A21EE9722832BC200C940C6 /* WordPressComOAuthClientFacade+Swift.swift */; };
1212
1A4095182271AEFC009AA86D /* WPAuthenticator-Swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4095152271AEFC009AA86D /* WPAuthenticator-Swift.h */; settings = {ATTRIBUTES = (Private, ); }; };
1313
3108613125AFA4830022F75E /* PasteboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3108613025AFA4830022F75E /* PasteboardTests.swift */; };
14+
3F338B6A289B877F0014ADC5 /* BuildkiteTestCollector in Frameworks */ = {isa = PBXBuildFile; productRef = 3F338B69289B877F0014ADC5 /* BuildkiteTestCollector */; };
1415
3F550D4E23DA429B007E5897 /* AppSelectorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F550D4D23DA429B007E5897 /* AppSelectorTests.swift */; };
1516
3F550D5123DA4A9C007E5897 /* LinkMailPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F550D5023DA4A9C007E5897 /* LinkMailPresenter.swift */; };
1617
3F550D5323DA4AC6007E5897 /* URLHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F550D5223DA4AC6007E5897 /* URLHandler.swift */; };
@@ -212,6 +213,7 @@
212213
3108613025AFA4830022F75E /* PasteboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasteboardTests.swift; sourceTree = "<group>"; };
213214
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>"; };
214215
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>"; };
216+
3F338B6B289B87E60014ADC5 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = "<group>"; };
215217
3F550D4D23DA429B007E5897 /* AppSelectorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSelectorTests.swift; sourceTree = "<group>"; };
216218
3F550D5023DA4A9C007E5897 /* LinkMailPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkMailPresenter.swift; sourceTree = "<group>"; };
217219
3F550D5223DA4AC6007E5897 /* URLHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLHandler.swift; sourceTree = "<group>"; };
@@ -402,6 +404,7 @@
402404
isa = PBXFrameworksBuildPhase;
403405
buildActionMask = 2147483647;
404406
files = (
407+
3F338B6A289B877F0014ADC5 /* BuildkiteTestCollector in Frameworks */,
405408
B5ED78FE207E976500A8FD8C /* WordPressAuthenticator.framework in Frameworks */,
406409
E8AF6B9EF50902F2117DFAF9 /* Pods_WordPressAuthenticatorTests.framework in Frameworks */,
407410
);
@@ -770,6 +773,7 @@
770773
B501C03F208FC52500D1E58F /* Services */,
771774
3F550D4C23DA4191007E5897 /* UI */,
772775
B5ED7904207E976500A8FD8C /* Info.plist */,
776+
3F338B6B289B87E60014ADC5 /* UnitTests.xctestplan */,
773777
);
774778
path = WordPressAuthenticatorTests;
775779
sourceTree = "<group>";
@@ -964,9 +968,9 @@
964968
buildConfigurationList = B5ED7908207E976500A8FD8C /* Build configuration list for PBXNativeTarget "WordPressAuthenticator" */;
965969
buildPhases = (
966970
6CD6648B820552D8638F8EDA /* [CP] Check Pods Manifest.lock */,
971+
B5ED78F1207E976500A8FD8C /* Headers */,
967972
B5ED78EF207E976500A8FD8C /* Sources */,
968973
B5ED78F0207E976500A8FD8C /* Frameworks */,
969-
B5ED78F1207E976500A8FD8C /* Headers */,
970974
B5ED78F2207E976500A8FD8C /* Resources */,
971975
B5A5274B20B479D30065BE81 /* CopyFiles */,
972976
);
@@ -995,6 +999,9 @@
995999
B5ED7900207E976500A8FD8C /* PBXTargetDependency */,
9961000
);
9971001
name = WordPressAuthenticatorTests;
1002+
packageProductDependencies = (
1003+
3F338B69289B877F0014ADC5 /* BuildkiteTestCollector */,
1004+
);
9981005
productName = WordPressAuthenticatorTests;
9991006
productReference = B5ED78FD207E976500A8FD8C /* WordPressAuthenticatorTests.xctest */;
10001007
productType = "com.apple.product-type.bundle.unit-test";
@@ -1030,6 +1037,9 @@
10301037
Base,
10311038
);
10321039
mainGroup = B5ED78EA207E976500A8FD8C;
1040+
packageReferences = (
1041+
3F338B66289B87650014ADC5 /* XCRemoteSwiftPackageReference "test-collector-swift" */,
1042+
);
10331043
productRefGroup = B5ED78F5207E976500A8FD8C /* Products */;
10341044
projectDirPath = "";
10351045
projectRoot = "";
@@ -1438,7 +1448,8 @@
14381448
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
14391449
MTL_ENABLE_DEBUG_INFO = NO;
14401450
SDKROOT = iphoneos;
1441-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1451+
SWIFT_COMPILATION_MODE = wholemodule;
1452+
SWIFT_OPTIMIZATION_LEVEL = "-O";
14421453
VALIDATE_PRODUCT = YES;
14431454
VERSIONING_SYSTEM = "apple-generic";
14441455
VERSION_INFO_PREFIX = "";
@@ -1459,7 +1470,11 @@
14591470
DYLIB_INSTALL_NAME_BASE = "@rpath";
14601471
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
14611472
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1462-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1473+
LD_RUNPATH_SEARCH_PATHS = (
1474+
"$(inherited)",
1475+
"@executable_path/Frameworks",
1476+
"@loader_path/Frameworks",
1477+
);
14631478
MARKETING_VERSION = 1.21.0;
14641479
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
14651480
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -1483,7 +1498,11 @@
14831498
DYLIB_INSTALL_NAME_BASE = "@rpath";
14841499
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
14851500
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1486-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1501+
LD_RUNPATH_SEARCH_PATHS = (
1502+
"$(inherited)",
1503+
"@executable_path/Frameworks",
1504+
"@loader_path/Frameworks",
1505+
);
14871506
MARKETING_VERSION = 1.21.0;
14881507
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
14891508
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -1501,7 +1520,11 @@
15011520
DEFINES_MODULE = YES;
15021521
DEVELOPMENT_TEAM = PZYM8XX95Q;
15031522
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
1504-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1523+
LD_RUNPATH_SEARCH_PATHS = (
1524+
"$(inherited)",
1525+
"@executable_path/Frameworks",
1526+
"@loader_path/Frameworks",
1527+
);
15051528
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
15061529
PRODUCT_NAME = "$(TARGET_NAME)";
15071530
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
@@ -1519,7 +1542,11 @@
15191542
DEFINES_MODULE = YES;
15201543
DEVELOPMENT_TEAM = PZYM8XX95Q;
15211544
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
1522-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1545+
LD_RUNPATH_SEARCH_PATHS = (
1546+
"$(inherited)",
1547+
"@executable_path/Frameworks",
1548+
"@loader_path/Frameworks",
1549+
);
15231550
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
15241551
PRODUCT_NAME = "$(TARGET_NAME)";
15251552
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
@@ -1579,7 +1606,8 @@
15791606
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
15801607
MTL_ENABLE_DEBUG_INFO = NO;
15811608
SDKROOT = iphoneos;
1582-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1609+
SWIFT_COMPILATION_MODE = wholemodule;
1610+
SWIFT_OPTIMIZATION_LEVEL = "-O";
15831611
VALIDATE_PRODUCT = YES;
15841612
VERSIONING_SYSTEM = "apple-generic";
15851613
VERSION_INFO_PREFIX = "";
@@ -1600,7 +1628,11 @@
16001628
DYLIB_INSTALL_NAME_BASE = "@rpath";
16011629
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
16021630
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1603-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1631+
LD_RUNPATH_SEARCH_PATHS = (
1632+
"$(inherited)",
1633+
"@executable_path/Frameworks",
1634+
"@loader_path/Frameworks",
1635+
);
16041636
MARKETING_VERSION = 1.21.0;
16051637
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
16061638
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -1618,7 +1650,11 @@
16181650
DEFINES_MODULE = YES;
16191651
DEVELOPMENT_TEAM = PZYM8XX95Q;
16201652
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
1621-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1653+
LD_RUNPATH_SEARCH_PATHS = (
1654+
"$(inherited)",
1655+
"@executable_path/Frameworks",
1656+
"@loader_path/Frameworks",
1657+
);
16221658
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
16231659
PRODUCT_NAME = "$(TARGET_NAME)";
16241660
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
@@ -1678,7 +1714,8 @@
16781714
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
16791715
MTL_ENABLE_DEBUG_INFO = NO;
16801716
SDKROOT = iphoneos;
1681-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1717+
SWIFT_COMPILATION_MODE = wholemodule;
1718+
SWIFT_OPTIMIZATION_LEVEL = "-O";
16821719
VALIDATE_PRODUCT = YES;
16831720
VERSIONING_SYSTEM = "apple-generic";
16841721
VERSION_INFO_PREFIX = "";
@@ -1699,7 +1736,11 @@
16991736
DYLIB_INSTALL_NAME_BASE = "@rpath";
17001737
INFOPLIST_FILE = WordPressAuthenticator/Info.plist;
17011738
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1702-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1739+
LD_RUNPATH_SEARCH_PATHS = (
1740+
"$(inherited)",
1741+
"@executable_path/Frameworks",
1742+
"@loader_path/Frameworks",
1743+
);
17031744
MARKETING_VERSION = 1.21.0;
17041745
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
17051746
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -1717,7 +1758,11 @@
17171758
DEFINES_MODULE = YES;
17181759
DEVELOPMENT_TEAM = PZYM8XX95Q;
17191760
INFOPLIST_FILE = WordPressAuthenticatorTests/Info.plist;
1720-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1761+
LD_RUNPATH_SEARCH_PATHS = (
1762+
"$(inherited)",
1763+
"@executable_path/Frameworks",
1764+
"@loader_path/Frameworks",
1765+
);
17211766
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
17221767
PRODUCT_NAME = "$(TARGET_NAME)";
17231768
SWIFT_OBJC_BRIDGING_HEADER = "WordPressAuthenticatorTests/SupportingFiles/WordPressAuthenticatorTests-Bridging-Header.h";
@@ -1764,6 +1809,25 @@
17641809
defaultConfigurationName = Release;
17651810
};
17661811
/* End XCConfigurationList section */
1812+
1813+
/* Begin XCRemoteSwiftPackageReference section */
1814+
3F338B66289B87650014ADC5 /* XCRemoteSwiftPackageReference "test-collector-swift" */ = {
1815+
isa = XCRemoteSwiftPackageReference;
1816+
repositoryURL = "https://github.com/buildkite/test-collector-swift";
1817+
requirement = {
1818+
kind = upToNextMajorVersion;
1819+
minimumVersion = 0.3.0;
1820+
};
1821+
};
1822+
/* End XCRemoteSwiftPackageReference section */
1823+
1824+
/* Begin XCSwiftPackageProductDependency section */
1825+
3F338B69289B877F0014ADC5 /* BuildkiteTestCollector */ = {
1826+
isa = XCSwiftPackageProductDependency;
1827+
package = 3F338B66289B87650014ADC5 /* XCRemoteSwiftPackageReference "test-collector-swift" */;
1828+
productName = BuildkiteTestCollector;
1829+
};
1830+
/* End XCSwiftPackageProductDependency section */
17671831
};
17681832
rootObject = B5ED78EB207E976500A8FD8C /* Project object */;
17691833
}

WordPressAuthenticator.xcodeproj/xcshareddata/xcschemes/WordPressAuthenticator.xcscheme

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "1200"
4-
version = "1.3">
4+
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
@@ -37,6 +37,12 @@
3737
ReferencedContainer = "container:WordPressAuthenticator.xcodeproj">
3838
</BuildableReference>
3939
</MacroExpansion>
40+
<TestPlans>
41+
<TestPlanReference
42+
reference = "container:WordPressAuthenticatorTests/UnitTests.xctestplan"
43+
default = "YES">
44+
</TestPlanReference>
45+
</TestPlans>
4046
<Testables>
4147
<TestableReference
4248
skipped = "NO">

WordPressAuthenticator.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"configurations" : [
3+
{
4+
"id" : "D97A5016-3F23-4D19-9CEB-C10A9AC3591F",
5+
"name" : "Configuration 1",
6+
"options" : {
7+
8+
}
9+
}
10+
],
11+
"defaultOptions" : {
12+
"environmentVariableEntries" : [
13+
{
14+
"key" : "BUILDKITE_ANALYTICS_TOKEN",
15+
"value" : "$(BUILDKITE_ANALYTICS_TOKEN)"
16+
},
17+
{
18+
"key" : "BUILDKITE_BRANCH",
19+
"value" : "$(BUILDKITE_BRANCH)"
20+
},
21+
{
22+
"key" : "BUILDKITE_BUILD_ID",
23+
"value" : "$(BUILDKITE_BUILD_ID)"
24+
},
25+
{
26+
"key" : "BUILDKITE_BUILD_NUMBER",
27+
"value" : "$(BUILDKITE_BUILD_NUMBER)"
28+
},
29+
{
30+
"key" : "BUILDKITE_BUILD_URL",
31+
"value" : "$(BUILDKITE_BUILD_URL)"
32+
},
33+
{
34+
"key" : "BUILDKITE_COMMIT",
35+
"value" : "$(BUILDKITE_COMMIT)"
36+
},
37+
{
38+
"key" : "BUILDKITE_JOB_ID",
39+
"value" : "$(BUILDKITE_JOB_ID)"
40+
},
41+
{
42+
"key" : "BUILDKITE_MESSAGE",
43+
"value" : "$(BUILDKITE_MESSAGE)"
44+
}
45+
],
46+
"targetForVariableExpansion" : {
47+
"containerPath" : "container:WordPressAuthenticator.xcodeproj",
48+
"identifier" : "B5ED78F3207E976500A8FD8C",
49+
"name" : "WordPressAuthenticator"
50+
},
51+
"testTimeoutsEnabled" : true
52+
},
53+
"testTargets" : [
54+
{
55+
"target" : {
56+
"containerPath" : "container:WordPressAuthenticator.xcodeproj",
57+
"identifier" : "B5ED78FC207E976500A8FD8C",
58+
"name" : "WordPressAuthenticatorTests"
59+
}
60+
}
61+
],
62+
"version" : 1
63+
}

0 commit comments

Comments
 (0)