Bug 1539614 [wpt PR 16077] - HTML: move textarea tests together, a=testonly
[gecko.git] / testing / web-platform / tests / .taskcluster.yml
blobd67608f47b4deceedccd08193290b6eabeefed16
1 version: 1
2 policy:
3   pullRequests: public
4 tasks:
5   $let:
6     event_str: {$json: {$eval: event}}
7   in:
8     $flattenDeep:
9       - $if: tasks_for == "github-push"
10         then:
11           $map:
12             $flatten:
13               $match: {
14                 event.ref == "refs/heads/master": [{name: firefox, channel: nightly}, {name: chrome, channel: dev}],
15                 event.ref == "refs/heads/epochs/daily": [{name: firefox, channel: stable}, {name: chrome, channel: stable}],
16                 event.ref == "refs/heads/epochs/weekly": [{name: firefox, channel: beta}, {name: chrome, channel: beta}]
17                 }
18           each(browser):
19             $map:
20               - [testharness, 1, 15]
21               - [testharness, 2, 15]
22               - [testharness, 3, 15]
23               - [testharness, 4, 15]
24               - [testharness, 5, 15]
25               - [testharness, 6, 15]
26               - [testharness, 7, 15]
27               - [testharness, 8, 15]
28               - [testharness, 9, 15]
29               - [testharness, 10, 15]
30               - [testharness, 11, 15]
31               - [testharness, 12, 15]
32               - [testharness, 13, 15]
33               - [testharness, 14, 15]
34               - [testharness, 15, 15]
35               - [reftest, 1, 10]
36               - [reftest, 2, 10]
37               - [reftest, 3, 10]
38               - [reftest, 4, 10]
39               - [reftest, 5, 10]
40               - [reftest, 6, 10]
41               - [reftest, 7, 10]
42               - [reftest, 8, 10]
43               - [reftest, 9, 10]
44               - [reftest, 10, 10]
45               - [wdspec, 1, 1]
46             each(chunk):
47               taskId: {$eval: 'as_slugid(browser.name + browser.channel + chunk[0] + str(chunk[1]))'}
48               taskGroupId: {$eval: 'as_slugid("task group")'}
49               created: {$fromNow: ''}
50               deadline: {$fromNow: '24 hours'}
51               provisionerId: aws-provisioner-v1
52               workerType:
53                 $if: event.repository.full_name == 'web-platform-tests/wpt'
54                 then:
55                   wpt-docker-worker
56                 else:
57                   github-worker
58               metadata:
59                 name: wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}
60                 description: >-
61                   A subset of WPT's "${chunk[0]}" tests (chunk number ${chunk[1]}
62                   of ${chunk[2]}), run in the ${browser.channel} release of
63                   ${browser.name}.
64                 owner: ${event.pusher.email}
65                 source: ${event.repository.url}
66               payload:
67                 image: harjgam/web-platform-tests:0.30
68                 maxRunTime: 7200
69                 artifacts:
70                   public/results:
71                     path: /home/test/artifacts
72                     type: directory
73                 env:
74                     TASK_EVENT: "${event_str}"
75                 command:
76                   - /bin/bash
77                   - --login
78                   - -c
79                   - set -ex;
80                     echo "wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}";
81                     ~/start.sh
82                       ${event.repository.url}
83                       ${event.ref}
84                       ${event.after};
85                     cd ~/web-platform-tests;
86                     ./tools/ci/run_tc.py
87                       --oom-killer
88                       --hosts
89                       --browser=${browser.name}
90                       --channel=${browser.channel}
91                       --xvfb
92                       run-all
93                       ./tools/ci/taskcluster-run.py
94                         ${browser.name}
95                         --
96                         --channel=${browser.channel}
97                         --log-wptreport=../artifacts/wpt_report.json
98                         --log-wptscreenshot=../artifacts/wpt_screenshot.txt
99                         --no-fail-on-unexpected
100                         --test-type=${chunk[0]}
101                         --this-chunk=${chunk[1]}
102                         --total-chunks=${chunk[2]};
103       - $if: tasks_for == "github-pull-request"
104         # PR tasks that run the tests in various configurations
105         then:
106           # Taskcluster responds to a number of events issued by the GitHub API
107           # which should not trigger re-validation.
108           $if: event.action in ['opened', 'reopened', 'synchronize']
109           then:
110             $map: [{name: firefox, channel: nightly}, {name: chrome, channel: dev}]
111             each(browser):
112               $map:
113                 # This is the main place to define new stability checks
114                 - name: wpt-${browser.name}-${browser.channel}-stability
115                   checkout: FETCH_HEAD
116                   diff_range: HEAD^
117                   description: >-
118                     Verify that all tests affected by a pull request are stable
119                     when executed in ${browser.name}.
120                   extra_args: '--verify'
121                 - name: wpt-${browser.name}-${browser.channel}-results
122                   checkout: FETCH_HEAD
123                   diff_range: HEAD^
124                   description: >-
125                     Collect results for all tests affected by a pull request in
126                     ${browser.name}.
127                   extra_args: >-
128                     --no-fail-on-unexpected
129                     --log-wptreport=../artifacts/wpt_report.json
130                     --log-wptscreenshot=../artifacts/wpt_screenshot.txt
131                 - name: wpt-${browser.name}-${browser.channel}-results-without-changes
132                   checkout: FETCH_HEAD^
133                   diff_range: FETCH_HEAD
134                   description: >-
135                     Collect results for all tests affected by a pull request in
136                     ${browser.name} but without the changes in the PR.
137                   extra_args: >-
138                     --no-fail-on-unexpected
139                     --log-wptreport=../artifacts/wpt_report.json
140                     --log-wptscreenshot=../artifacts/wpt_screenshot.txt
141               each(operation):
142                 taskId: {$eval: 'as_slugid(operation.name)'}
143                 taskGroupId: {$eval: 'as_slugid("task group")'}
144                 created: {$fromNow: ''}
145                 deadline: {$fromNow: '24 hours'}
146                 provisionerId: aws-provisioner-v1
147                 workerType:
148                   $if: event.repository.full_name == 'web-platform-tests/wpt'
149                   then:
150                     wpt-docker-worker
151                   else:
152                     github-worker
153                 metadata:
154                   name: ${operation.name}
155                   description: ${operation.description}
156                   owner: ${event.pull_request.user.login}@users.noreply.github.com
157                   source: ${event.repository.url}
158                 payload:
159                   image: harjgam/web-platform-tests:0.30
160                   maxRunTime: 7200
161                   artifacts:
162                     public/results:
163                       path: /home/test/artifacts
164                       type: directory
165                   env:
166                     TASK_EVENT: "${event_str}"
167                   # Fetch the GitHub-provided merge commit (rather than the pull
168                   # request branch) so that the tasks simulate the behavior of the
169                   # submitted patch after it is merged. Using the merge commit also
170                   # simplifies detection of modified files because the first parent
171                   # of the merge commit can consistently be used to summarize the
172                   # changes.
173                   command:
174                     - /bin/bash
175                     - --login
176                     - -c
177                     - set -ex;
178                       echo "${operation.name}";
179                       ~/start.sh
180                         ${event.repository.clone_url}
181                         refs/pull/${event.number}/merge
182                         FETCH_HEAD;
183                       cd web-platform-tests;
184                       ./tools/ci/run_tc.py
185                         --checkout=${operation.checkout}
186                         --oom-killer
187                         --browser=${browser.name}
188                         --channel=${browser.channel}
189                         --xvfb
190                         stability
191                         ./tools/ci/taskcluster-run.py
192                           --commit-range ${operation.diff_range}
193                           ${browser.name}
194                           --
195                           --channel=${browser.channel}
196                           ${operation.extra_args};
197       - $map:
198           # This is the main point to define new CI checks other than stability checks
199         - name: lint
200           description: >-
201             Lint for wpt-specific requirements
202           script: ./tools/ci/run_tc.py --no-hosts lint tools/ci/ci_lint.sh
203           conditions:
204             push
205             pull-request
206         - name: update built tests
207           description: >-
208             Ensure test suites that require a build step are updated
209           script: ./tools/ci/run_tc.py --no-hosts update_built tools/ci/ci_built_diff.sh
210           conditions:
211             pull-request
212         - name: tools/ unittests (Python 2)
213           description: >-
214             Unit tests for tools running under Python 2.7, excluding wptrunner
215           script: >-
216             export TOXENV=py27;
217             export HYPOTHESIS_PROFILE=ci;
218             ./tools/ci/run_tc.py \
219               tools_unittest \
220               tools/ci/ci_tools_unittest.sh
221           conditions:
222             push
223             pull-request
224         - name: tools/ unittests (Python 3)
225           description: >-
226             Unit tests for tools running under Python 3, excluding wptrunner
227           script: >-
228             export TOXENV=py36;
229             export HYPOTHESIS_PROFILE=ci;
230             sudo apt install -qqy python3-pip;
231             ./tools/ci/run_tc.py \
232               tools_unittest \
233               tools/ci/ci_tools_unittest.sh
234           conditions:
235             push
236             pull-request
237         - name: tools/wpt/ tests
238           description: >-
239             Integration tests for wpt commands
240           script: >-
241             export TOXENV=py27;
242             sudo apt install -qqy libnss3-tools;
243             ./tools/ci/run_tc.py \
244               --oom-killer \
245               --browser=firefox \
246               --browser=chrome \
247               --channel=experimental \
248               --xvfb \
249               wpt_integration \
250               tools/ci/ci_wpt.sh
251           conditions:
252             pull-request
253         - name: resources/ tests
254           description: >-
255             Tests for testharness.js and other files in resources/
256           script: >-
257             export TOXENV=py27;
258             ./tools/ci/run_tc.py \
259               --browser=firefox \
260               --channel=experimental \
261               --xvfb \
262               resources_unittest \
263               tools/ci/ci_resources_unittest.sh
264           conditions:
265             pull-request
266         - name: infrastructure/ tests
267           description: >-
268             Smoketests for wptrunner
269           script: >-
270             sudo apt install -qqy libnss3-tools libappindicator1 fonts-liberation;
271             ./tools/ci/run_tc.py \
272               --oom-killer \
273               --browser=firefox \
274               --browser=chrome \
275               --channel=experimental \
276               --no-hosts \
277               --xvfb \
278               wptrunner_infrastructure \
279               tools/ci/ci_wptrunner_infrastructure.sh
280           conditions:
281             pull-request
282         each(operation):
283           # Note: jsone doesn't short-circuit evaluation so all parts of the conditional are evaluated
284           # Accessing properties using the [] notation allows them to evaluate as null in case they're undefined
285           # TODO: Allow running pushes on branches other than master
286           - $if: ("push" in operation.conditions && tasks_for == "github-push" && event['ref'] == "refs/heads/master") || ("pull-request" in operation.conditions && tasks_for == "github-pull-request" && event['action'] in ['opened', 'reopened', 'synchronize'])
287             then:
288               $let:
289                 checkout_ref:
290                   $if: tasks_for == "github-push"
291                   then:
292                     ${event.ref}
293                   else:
294                     refs/pull/${event.number}/merge
295               in:
296                 taskId: {$eval: 'as_slugid(operation.name)'}
297                 taskGroupId: {$eval: 'as_slugid("task group")'}
298                 created: {$fromNow: ''}
299                 deadline: {$fromNow: '24 hours'}
300                 provisionerId: aws-provisioner-v1
301                 workerType:
302                   $if: event.repository.full_name == 'web-platform-tests/wpt'
303                   then:
304                     wpt-docker-worker
305                   else:
306                     github-worker
307                 metadata:
308                   name: ${operation.name}
309                   description: ${operation.description}
310                   owner: ${event.sender.login}@users.noreply.github.com
311                   source: ${event.repository.url}
312                 payload:
313                   image: harjgam/web-platform-tests:0.30
314                   maxRunTime: 7200
315                   artifacts:
316                     public/results:
317                       path: /home/test/artifacts
318                       type: directory
319                   env:
320                     TASK_EVENT: "${event_str}"
321                   command:
322                     - /bin/bash
323                     - --login
324                     - -c
325                     - set -ex;
326                       echo "${operation.name}";
327                       ~/start.sh
328                         ${event.repository.clone_url}
329                         ${checkout_ref}
330                         FETCH_HEAD;
331                       cd ~/web-platform-tests;
332                       ${operation.script};