Skip to content

Commit 82c88ee

Browse files
committed
Merge branch 'trunk' into pairing/20220902-common-protocol-for-country
# Conflicts: # WooCommerce/WooCommerce.xcodeproj/project.pbxproj
2 parents c7ff274 + 69be467 commit 82c88ee

File tree

853 files changed

+63713
-9089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

853 files changed

+63713
-9089
lines changed

.buildkite/cache-builder.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
common_params:
88
# Common plugin settings to use with the `plugins` key.
99
- &common_plugins
10-
- automattic/bash-cache#v1.5.0
11-
- automattic/git-s3-cache#v1.1.0:
10+
- automattic/bash-cache#2.8.0
11+
- automattic/git-s3-cache#v1.1.3:
1212
bucket: "a8c-repo-mirrors"
13-
repo: "woocommerce/woocommerce-ios/"
13+
# This is not necessarily the actual name of the repo or the GitHub organization
14+
# it belongs to. It is the key used in the bucket, which is set based on
15+
# the Buildkite pipeline slug
16+
repo: "automattic/woocommerce-ios/"
1417
# Common environment values to use with the `env` key.
1518
- &common_env
16-
IMAGE_ID: xcode-13.4.1
19+
IMAGE_ID: xcode-14
1720

1821
steps:
1922

@@ -25,10 +28,6 @@ steps:
2528
#################
2629
- label: ":cocoapods: Rebuild CocoaPods cache"
2730
command: |
28-
# Workaround for https://github.com/Automattic/buildkite-ci/issues/79
29-
echo "--- :rubygems: Fixing Ruby Setup"
30-
gem install bundler
31-
3231
echo "--- :rubygems: Setting up Gems"
3332
install_gems
3433

.buildkite/commands/build-for-testing.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash -eu
22

3-
# Workaround for https://github.com/Automattic/buildkite-ci/issues/79
4-
echo "--- :rubygems: Fixing Ruby Setup"
5-
gem install bundler
6-
73
echo "--- :rubygems: Setting up Gems"
84
restore_cache "$(hash_file .ruby-version)-$(hash_file Gemfile.lock)"
95
install_gems

.buildkite/commands/installable-build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash -eu
22

3-
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4-
echo "--- :rubygems: Fixing Ruby Setup"
5-
gem install bundler
6-
73
# FIXIT-13.1: Installable Builds want the latest version of Sentry CLI
84
brew update
95
brew upgrade sentry-cli
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash -eu
2+
3+
echo "--- :writing_hand: Copy Files"
4+
SECRETS_DIR=~/.configure/woocommerce-ios/secrets
5+
mkdir -pv $SECRETS_DIR
6+
cp -v fastlane/env/project.env.example $SECRETS_DIR/project.env
7+
8+
lint_localized_strings_format

.buildkite/commands/release-build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash -eu
22

3-
# Workaround for https://github.com/Automattic/buildkite-ci/issues/79
4-
echo "--- :rubygems: Fixing Ruby Setup"
5-
gem install bundler
6-
73
echo "--- :arrow_down: Installing Release Dependencies"
84
brew update # Update homebrew to temporarily fix a bintray issue
95
brew install imagemagick
@@ -22,5 +18,6 @@ bundle exec fastlane run configure_apply
2218
echo "--- :hammer_and_wrench: Building"
2319
bundle exec fastlane build_and_upload_itc \
2420
skip_confirm:true \
21+
skip_prechecks:true \
2522
create_release:true \
2623
beta_release:${1:-true} # use first call param, default to true for safety

.buildkite/commands/run-ui-tests.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
TEST_NAME=$1
44
DEVICE=$2
5-
IOS_VERSION=$3
65

7-
echo "Running $TEST_NAME on $DEVICE for iOS $IOS_VERSION"
6+
echo "Running $TEST_NAME on $DEVICE"
87

98
# Run this at the start to fail early if value not available
109
echo '--- :test-analytics: Configuring Test Analytics'
@@ -14,10 +13,6 @@ else
1413
export BUILDKITE_ANALYTICS_TOKEN=$BUILDKITE_ANALYTICS_TOKEN_UI_TESTS_IPAD
1514
fi
1615

17-
# Workaround for https://github.com/Automattic/buildkite-ci/issues/79
18-
echo "--- :rubygems: Fixing Ruby Setup"
19-
gem install bundler
20-
2116
# FIXIT-13.1: Temporary fix until all VMs have a JVM
2217
brew install openjdk@11
2318
sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
@@ -35,4 +30,18 @@ install_cocoapods
3530
echo "--- 🧪 Testing"
3631
xcrun simctl list >> /dev/null
3732
rake mocks &
38-
bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE" ios_version:"$IOS_VERSION"
33+
set +e
34+
bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE"
35+
TESTS_EXIT_STATUS=$?
36+
set -e
37+
38+
if [[ "$TESTS_EXIT_STATUS" -ne 0 ]]; then
39+
# Keep the (otherwise collapsed) current "Testing" section open in Buildkite logs on error. See https://buildkite.com/docs/pipelines/managing-log-output#collapsing-output
40+
echo "^^^ +++"
41+
echo "UI Tests failed!"
42+
fi
43+
44+
echo "--- 📦 Zipping test results"
45+
cd fastlane/test_output/ && zip -rq WooCommerce.xcresult.zip WooCommerce.xcresult && cd -
46+
47+
exit $TESTS_EXIT_STATUS

.buildkite/commands/run-unit-tests.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,22 @@ echo "--- 📦 Downloading Build Artifacts"
88
buildkite-agent artifact download build-products.tar .
99
tar -xf build-products.tar
1010

11-
# Workaround for https://github.com/Automattic/buildkite-ci/issues/79
12-
echo "--- :rubygems: Fixing Ruby Setup"
13-
gem install bundler
14-
1511
echo "--- :rubygems: Setting up Gems"
1612
install_gems
1713

1814
echo "--- 🧪 Testing"
15+
set +e
1916
bundle exec fastlane test_without_building name:UnitTests
17+
TESTS_EXIT_STATUS=$?
18+
set -e
19+
20+
if [[ "$TESTS_EXIT_STATUS" -ne 0 ]]; then
21+
# Keep the (otherwise collapsed) current "Testing" section open in Buildkite logs on error. See https://buildkite.com/docs/pipelines/managing-log-output#collapsing-output
22+
echo "^^^ +++"
23+
echo "Unit Tests failed!"
24+
fi
25+
26+
echo "--- 📦 Zipping test results"
27+
cd fastlane/test_output/ && zip -rq WooCommerce.xcresult.zip WooCommerce.xcresult && cd -
28+
29+
exit $TESTS_EXIT_STATUS

.buildkite/pipeline.yml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
common_params:
33
# Common plugin settings to use with the `plugins` key.
44
- &common_plugins
5-
- automattic/bash-cache#v1.5.0
6-
- automattic/git-s3-cache#v1.1.0:
5+
- automattic/bash-cache#2.12.0
6+
- automattic/git-s3-cache#v1.1.3:
77
bucket: "a8c-repo-mirrors"
8-
repo: "woocommerce/woocommerce-ios/"
8+
# This is not necessarily the actual name of the repo or the GitHub organization
9+
# it belongs to. It is the key used in the bucket, which is set based on
10+
# the Buildkite pipeline slug
11+
repo: "automattic/woocommerce-ios/"
912
# Common environment values to use with the `env` key.
1013
- &common_env
11-
IMAGE_ID: xcode-13.4.1
14+
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
15+
IMAGE_ID: xcode-14
1216

1317
# This is the default pipeline – it will build and test the app
1418
steps:
@@ -44,45 +48,54 @@ steps:
4448
depends_on: "build"
4549
env: *common_env
4650
plugins: *common_plugins
51+
artifact_paths:
52+
- "fastlane/test_output/*"
4753
notify:
4854
- github_commit_status:
4955
context: "Unit Tests"
5056

5157
#################
52-
# Lint Translations
58+
# Linters
5359
#################
54-
- label: "🧹 Lint Translations"
55-
command: "gplint /workdir/WooCommerce/Resources/AppStoreStrings.pot"
56-
plugins:
57-
- docker#v3.8.0:
58-
image: "public.ecr.aws/automattic/glotpress-validator:1.0.0"
59-
agents:
60-
queue: "default"
61-
notify:
62-
- github_commit_status:
63-
context: "Lint Translations"
60+
- group: Linters
61+
steps:
62+
- label: "🧹 Lint Translations"
63+
command: "gplint /workdir/WooCommerce/Resources/AppStoreStrings.pot"
64+
plugins:
65+
- docker#v3.8.0:
66+
image: "public.ecr.aws/automattic/glotpress-validator:1.0.0"
67+
agents:
68+
queue: "default"
69+
notify:
70+
- github_commit_status:
71+
context: "Lint Translations"
72+
73+
- label: ":sleuth_or_spy: Lint Localized Strings Format"
74+
command: .buildkite/commands/lint-localized-strings-format.sh
75+
plugins: *common_plugins
76+
env: *common_env
6477

6578
#################
6679
# UI Tests
6780
#################
6881
- label: "🔬 UI Tests (iPhone)"
69-
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 11' 15.0
82+
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 14'
7083
depends_on: "build"
7184
env: *common_env
7285
plugins: *common_plugins
7386
artifact_paths:
74-
- "build/results/"
87+
- "fastlane/test_output/*"
7588
notify:
7689
- github_commit_status:
7790
context: "UI Tests (iPhone)"
7891

7992
- label: "🔬 UI Tests (iPad)"
80-
command: .buildkite/commands/run-ui-tests.sh UITests "iPad Air (4th generation)" 15.0
93+
command: .buildkite/commands/run-ui-tests.sh UITests "iPad Air (5th generation)"
8194
depends_on: "build"
8295
env: *common_env
8396
plugins: *common_plugins
8497
artifact_paths:
85-
- "build/results/"
98+
- "fastlane/test_output/*"
8699
notify:
87100
- github_commit_status:
88101
context: "UI Tests (iPad)"

.buildkite/release-builds.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
common_params:
55
# Common plugin settings to use with the `plugins` key.
66
- &common_plugins
7-
- automattic/bash-cache#v1.5.0
8-
- automattic/git-s3-cache#v1.1.0:
7+
- automattic/bash-cache#2.8.0
8+
- automattic/git-s3-cache#v1.1.3:
99
bucket: "a8c-repo-mirrors"
10-
repo: "woocommerce/woocommerce-ios/"
10+
# This is not necessarily the actual name of the repo or the GitHub organization
11+
# it belongs to. It is the key used in the bucket, which is set based on
12+
# the Buildkite pipeline slug
13+
repo: "automattic/woocommerce-ios/"
1114
# Common environment values to use with the `env` key.
1215
- &common_env
13-
IMAGE_ID: xcode-13.4.1
16+
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
17+
IMAGE_ID: xcode-14
1418

1519
steps:
1620

.xcode-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
~> 14.0

0 commit comments

Comments
 (0)