Skip to content

Commit b14619b

Browse files
authored
Add placeholder step in CI for Reader unit tests (#24387)
* Define group for unit tests in CI * Add lane to sync code signing for Reader on App Store account I named it with `..._app_store_reader` instead of `..._reader_app_store` like the other lanes for Jetpack and WordPress because I find that suffixing the app name leads to better code completion and homogeneous API. ``` ..._app_store_jetpack ..._app_store_reader ..._app_store_wordpress ``` This is not the time to change the other lane names, however. * Add placeholder Reader unit tests step in CI; runs code signing sync
1 parent 2c60dbf commit b14619b

File tree

4 files changed

+47
-9
lines changed

4 files changed

+47
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash -eu
2+
3+
# Run this at the start to fail early if value not available
4+
# TODO: We'll need to create a token for Reader
5+
# echo '--- :test-analytics: Configuring Test Analytics'
6+
# export BUILDKITE_ANALYTICS_TOKEN=$BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS
7+
8+
"$(dirname "${BASH_SOURCE[0]}")/shared-set-up.sh"
9+
10+
# For the moment, run code signing here just to show it works
11+
# TODO: This will move to the prototype and production builds steps eventually...
12+
bundle exec fastlane update_certs_and_profiles_app_store_reader

.buildkite/pipeline.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,25 @@ steps:
5252
#################
5353
# Run Unit Tests
5454
#################
55-
- label: "🔬 :wordpress: Unit Tests"
56-
command: ".buildkite/commands/run-unit-tests.sh"
57-
depends_on: "build_wordpress"
58-
plugins: [$CI_TOOLKIT_PLUGIN]
59-
artifact_paths:
60-
- "build/results/*"
61-
notify:
62-
- github_commit_status:
63-
context: "Unit Tests"
55+
- group: "🔬 Unit Tests"
56+
steps:
57+
- label: "🔬 :wordpress: Unit Tests"
58+
command: ".buildkite/commands/run-unit-tests.sh"
59+
depends_on: "build_wordpress"
60+
plugins: [$CI_TOOLKIT_PLUGIN]
61+
artifact_paths:
62+
- "build/results/*"
63+
notify:
64+
- github_commit_status:
65+
context: "Unit Tests"
66+
- label: "🔬 Reader Unit Tests"
67+
command: ".buildkite/commands/run-unit-tests-reader.sh"
68+
plugins: [$CI_TOOLKIT_PLUGIN]
69+
artifact_paths:
70+
- "build/results/*"
71+
notify:
72+
- github_commit_status:
73+
context: "Reader Unit Tests"
6474

6575
#################
6676
# UI Tests

fastlane/Fastfile

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ JETPACK_EXTENSIONS_BUNDLE_IDENTIFIERS = %w[
4747
].map { |suffix| "#{JETPACK_BUNDLE_IDENTIFIER}.#{suffix}" }
4848
ALL_JETPACK_BUNDLE_IDENTIFIERS = [JETPACK_BUNDLE_IDENTIFIER, *JETPACK_EXTENSIONS_BUNDLE_IDENTIFIERS].freeze
4949

50+
READER_BUNDLE_IDENTIFIER = 'com.automattic.reader'
51+
# Redundant but handy for consistency, especially in codesign.rb
52+
ALL_READER_BUNDLE_IDENTIFIERS = [READER_BUNDLE_IDENTIFIER].freeze
53+
5054
# Environment Variables — used by lanes but also potentially actions
5155
Dotenv.load(USER_ENV_FILE_PATH)
5256
Dotenv.load(PROJECT_ENV_FILE_PATH)

fastlane/lanes/codesign.rb

+12
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@
8787
)
8888
end
8989

90+
# Downloads all the required certificates and profiles (using `match``) for the Reader App Store builds.
91+
# Optionally, it can create any new necessary certificate or profile.
92+
#
93+
# @option [Boolean] readonly (default: true) Whether to only fetch existing certificates and profiles, without generating new ones.
94+
#
95+
lane :update_certs_and_profiles_app_store_reader do |readonly: true|
96+
update_code_signing_app_store(
97+
app_identifiers: ALL_READER_BUNDLE_IDENTIFIERS,
98+
readonly: readonly
99+
)
100+
end
101+
90102
# Downloads all the required certificates and profiles (using `match`) for both Jetpack and WordPress App Store variants.
91103
# Optionally, it can create any new necessary certificate or profile.
92104
#

0 commit comments

Comments
 (0)