Skip to content

Commit e898232

Browse files
committed
Merge branch 'issue/5976-wcpaycharges-storage' into issue/5976-wcpaycharges-yosemite
# Conflicts: # Storage/Storage/Model/WooCommerce.xcdatamodeld/Model 64.xcdatamodel/contents # Yosemite/Yosemite/Model/Model.swift
2 parents ba1c798 + 054ca52 commit e898232

File tree

209 files changed

+6813
-3022
lines changed

Some content is hidden

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

209 files changed

+6813
-3022
lines changed

.buildkite/cache-builder.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This script is run via Buildkite's scheduled jobs feature.
2+
#
3+
# It's meant to rebuild various CI caches on a periodic async basis, so as
4+
# not to waste time on every CI job updating the cache.
5+
6+
# Nodes with values to reuse in the pipeline.
7+
common_params:
8+
# Common plugin settings to use with the `plugins` key.
9+
- &common_plugins
10+
- automattic/bash-cache#v1.5.0
11+
- automattic/git-s3-cache#v1.1.0:
12+
bucket: "a8c-repo-mirrors"
13+
repo: "woocommerce/woocommerce-ios/"
14+
# Common environment values to use with the `env` key.
15+
- &common_env
16+
IMAGE_ID: xcode-12.5.1
17+
18+
steps:
19+
20+
#################
21+
# Build the CocoaPods Base Cache
22+
#
23+
# This prevents the base cache from infinite growth caused by storing every
24+
# version of every pod we've ever used.
25+
#################
26+
- label: ":cocoapods: Rebuild CocoaPods cache"
27+
command: |
28+
echo "--- :rubygems: Setting up Gems"
29+
install_gems
30+
31+
echo "--- :cocoapods: Rebuilding Pod Cache"
32+
cache_cocoapods_specs_repos
33+
env: *common_env
34+
plugins: *common_plugins
35+
36+
#################
37+
# Build the Git Repo cache
38+
#
39+
# Because this repo is so large, we periodically create a Git Mirror and copy it to S3,
40+
# from where it can be fetched by agents more quickly than from GitHub, and so that
41+
# agents then have less new commits to `git pull` by using that cache as starting point
42+
#################
43+
- label: ":git: Rebuild git cache"
44+
command: "cache_repo a8c-repo-mirrors"
45+
plugins: *common_plugins
46+
agents:
47+
queue: "default"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash -eu
2+
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+
7+
echo "--- :rubygems: Setting up Gems"
8+
restore_cache "$(hash_file .ruby-version)-$(hash_file Gemfile.lock)"
9+
install_gems
10+
11+
echo "--- :cocoapods: Setting up Pods"
12+
install_cocoapods
13+
14+
echo "--- :writing_hand: Copy Files"
15+
mkdir -pv ~/.configure/woocommerce-ios/secrets
16+
cp -v fastlane/env/project.env.example ~/.configure/woocommerce-ios/secrets/project.env
17+
18+
echo "--- :hammer_and_wrench: Building"
19+
bundle exec fastlane build_for_testing
20+
21+
echo "--- :arrow_up: Upload Build Products"
22+
tar -cf build-products.tar DerivedData/Build/Products/
23+
buildkite-agent artifact upload build-products.tar
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash -eu
2+
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+
7+
# FIXIT-13.1: Installable Builds want the latest version of Sentry CLI
8+
brew update
9+
brew upgrade sentry-cli
10+
11+
echo "--- :rubygems: Setting up Gems"
12+
install_gems
13+
14+
echo "--- :cocoapods: Setting up Pods"
15+
install_cocoapods
16+
17+
echo "--- :closed_lock_with_key: Installing Secrets"
18+
bundle exec fastlane run configure_apply
19+
20+
echo "--- :hammer_and_wrench: Building"
21+
bundle exec fastlane build_and_upload_installable_build
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash -eu
2+
3+
TEST_NAME=$1
4+
DEVICE=$2
5+
IOS_VERSION=$3
6+
7+
echo "Running $TEST_NAME on $DEVICE for iOS $IOS_VERSION"
8+
9+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
10+
echo "--- :rubygems: Fixing Ruby Setup"
11+
gem install bundler
12+
13+
# FIXIT-13.1: Temporary fix until all VMs have a JVM
14+
brew install openjdk@11
15+
sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
16+
17+
echo "--- 📦 Downloading Build Artifacts"
18+
buildkite-agent artifact download build-products.tar .
19+
tar -xf build-products.tar
20+
21+
echo "--- :rubygems: Setting up Gems"
22+
install_gems
23+
24+
echo "--- :cocoapods: Setting up Pods"
25+
install_cocoapods
26+
27+
echo "--- 🧪 Testing"
28+
xcrun simctl list >> /dev/null
29+
rake mocks &
30+
bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE" ios_version:"$IOS_VERSION"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -eu
2+
3+
echo "--- 📦 Downloading Build Artifacts"
4+
buildkite-agent artifact download build-products.tar .
5+
tar -xf build-products.tar
6+
7+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
8+
echo "--- :rubygems: Fixing Ruby Setup"
9+
gem install bundler
10+
11+
echo "--- :rubygems: Setting up Gems"
12+
install_gems
13+
14+
echo "--- 🧪 Testing"
15+
bundle exec fastlane test_without_building name:UnitTests

.buildkite/pipeline.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Nodes with values to reuse in the pipeline.
2+
common_params:
3+
# Common plugin settings to use with the `plugins` key.
4+
- &common_plugins
5+
- automattic/bash-cache#v1.5.0
6+
- automattic/git-s3-cache#v1.1.0:
7+
bucket: "a8c-repo-mirrors"
8+
repo: "woocommerce/woocommerce-ios/"
9+
# Common environment values to use with the `env` key.
10+
- &common_env
11+
IMAGE_ID: xcode-13
12+
13+
# This is the default pipeline – it will build and test the app
14+
steps:
15+
#################
16+
# Build the app
17+
#################
18+
- label: ":pipeline: Build"
19+
key: "build"
20+
command: ".buildkite/commands/build-for-testing.sh"
21+
env: *common_env
22+
plugins: *common_plugins
23+
notify:
24+
- github_commit_status:
25+
context: "Build"
26+
27+
#################
28+
# Create Installable Build
29+
#################
30+
- label: "🛠 Installable Build"
31+
command: ".buildkite/commands/installable-build.sh"
32+
env: *common_env
33+
plugins: *common_plugins
34+
if: build.pull_request.id != null
35+
notify:
36+
- github_commit_status:
37+
context: "Installable Build"
38+
39+
#################
40+
# Run Unit Tests
41+
#################
42+
- label: "🔬 Unit Tests"
43+
command: ".buildkite/commands/run-unit-tests.sh"
44+
depends_on: "build"
45+
env: *common_env
46+
plugins: *common_plugins
47+
notify:
48+
- github_commit_status:
49+
context: "Unit Tests"
50+
51+
#################
52+
# Lint Translations
53+
#################
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"
64+
65+
#################
66+
# UI Tests
67+
#################
68+
- label: "🔬 UI Tests (iPhone)"
69+
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 11' 15.0
70+
depends_on: "build"
71+
env: *common_env
72+
plugins: *common_plugins
73+
artifact_paths:
74+
- "build/results/"
75+
notify:
76+
- github_commit_status:
77+
context: "UI Tests (iPhone)"
78+
79+
- label: "🔬 UI Tests (iPad)"
80+
command: .buildkite/commands/run-ui-tests.sh UITests "iPad Air (4th generation)" 15.0
81+
depends_on: "build"
82+
env: *common_env
83+
plugins: *common_plugins
84+
artifact_paths:
85+
- "build/results/"
86+
notify:
87+
- github_commit_status:
88+
context: "UI Tests (iPad)"

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
command: bundle --path vendor/bundle
9999
- run:
100100
name: Run Unit Tests
101-
command: bundle exec fastlane test_without_building name:UnitTests try_count:3 device:'<< parameters.device >>' ios-version:'<< parameters.ios-version >>'
101+
command: bundle exec fastlane test_without_building name:UnitTests device:'<< parameters.device >>' ios-version:'<< parameters.ios-version >>'
102102
- ios/save-xcodebuild-artifacts:
103103
result-bundle-path: build/results
104104
UI Tests:

Fakes/Fakes/Networking.generated.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ extension InboxNote {
213213
actions: .fake(),
214214
title: .fake(),
215215
content: .fake(),
216-
isDeleted: .fake(),
216+
isRemoved: .fake(),
217217
isRead: .fake(),
218218
dateCreated: .fake()
219219
)

0 commit comments

Comments
 (0)