-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathpipeline.yml
145 lines (132 loc) · 4.37 KB
/
pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Most of the steps need to run on a macOS agent, so let's define it as a root property.
agents:
queue: mac
env:
IMAGE_ID: $IMAGE_ID
# This is the default pipeline – it will build and test the app
steps:
#################
# Create Prototype Builds for WP and JP
#################
- group: "🛠 Prototype Builds"
steps:
- label: "🛠 WordPress Prototype Build"
command: ".buildkite/commands/prototype-build-wordpress.sh"
plugins: [$CI_TOOLKIT_PLUGIN]
if: "build.pull_request.id != null || build.pull_request.draft"
notify:
- github_commit_status:
context: "WordPress Prototype Build"
- label: "🛠 Jetpack Prototype Build"
command: ".buildkite/commands/prototype-build-jetpack.sh"
plugins: [$CI_TOOLKIT_PLUGIN]
if: "build.pull_request.id != null || build.pull_request.draft"
notify:
- github_commit_status:
context: "Jetpack Prototype Build"
#################
# Create Builds for Testing
#################
- group: "🛠 Builds for Testing"
steps:
- label: "🛠 :wordpress: Build for Testing"
key: "build_wordpress"
command: ".buildkite/commands/build-for-testing.sh wordpress"
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- github_commit_status:
context: "WordPress Build for Testing"
- label: "🛠 :jetpack: Build for Testing"
key: "build_jetpack"
command: ".buildkite/commands/build-for-testing.sh jetpack"
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- github_commit_status:
context: "Jetpack Build for Testing"
#################
# Run Unit Tests
#################
- label: "WordPressData tests"
command: |
echo "--- :rubygems: Setting up Gems"
install_gems
echo "--- :swift: Setting up Swift Packages"
install_swiftpm_dependencies
echo "--- :microscope: Test"
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=120 bundle exec fastlane run scan \
scheme:WordPressData \
device:'iPhone 16'
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
notify:
- github_commit_status:
context: "WordPressData Unit Tests"
- label: "🔬 :wordpress: Unit Tests"
command: ".buildkite/commands/run-unit-tests.sh"
depends_on: "build_wordpress"
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
notify:
- github_commit_status:
context: "Unit Tests"
#################
# UI Tests
#################
- group: "🔬 UI Tests"
steps:
- label: "🔬 :jetpack: UI Tests (iPhone)"
command: .buildkite/commands/run-ui-tests.sh 'iPhone 16'
depends_on: "build_jetpack"
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
- "build/results/crashes/*"
notify:
- github_commit_status:
context: "UI Tests (iPhone)"
- label: "🔬 :jetpack: UI Tests (iPad)"
command: .buildkite/commands/run-ui-tests.sh 'iPad (10th generation)'
depends_on: "build_jetpack"
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
- "build/results/crashes/*"
notify:
- github_commit_status:
context: "UI Tests (iPad)"
#################
# Linters
#################
- group: "Linters"
steps:
- label: "☢️ Danger - PR Check"
command: danger
key: danger
if: "build.pull_request.id != null"
retry:
manual:
permit_on_passed: true
agents:
queue: "linter"
- label: ":swift: SwiftLint"
command: swiftlint
notify:
- github_commit_status:
context: "SwiftLint"
agents:
queue: "linter"
- label: "🧹 Lint Translations"
command: "gplint /workdir/WordPress/Resources/AppStoreStrings.po"
plugins:
- docker#v3.8.0:
image: "public.ecr.aws/automattic/glotpress-validator:1.0.0"
agents:
queue: "default"
notify:
- github_commit_status:
context: "Lint Translations"
- label: ":sleuth_or_spy: Lint Localized Strings Format"
command: .buildkite/commands/lint-localized-strings-format.sh
plugins: [$CI_TOOLKIT_PLUGIN]