summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/.taskcluster.yml
blob: 53518a9498a7cd3dafcc6f0a0ca5b952c0fd9330 (plain)
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
version: 1
reporting: checks-v1
policy:
  pullRequests: public
tasks:
  $let:
    run_task:
      $if: 'tasks_for == "github-push"'
      then:
        $if: 'event.ref in ["refs/heads/master", "refs/heads/epochs/daily", "refs/heads/epochs/weekly", "refs/heads/triggers/chrome_stable", "refs/heads/triggers/chrome_beta", "refs/heads/triggers/chrome_canary", "refs/heads/triggers/chrome_dev", "refs/heads/triggers/chrome_nightly", "refs/heads/triggers/firefox_stable", "refs/heads/triggers/firefox_beta", "refs/heads/triggers/firefox_nightly", "refs/heads/triggers/firefox_android_nightly", "refs/heads/triggers/webkitgtk_minibrowser_stable", "refs/heads/triggers/webkitgtk_minibrowser_beta", "refs/heads/triggers/webkitgtk_minibrowser_nightly", "refs/heads/triggers/servo_nightly"]'
        then: true
        else: false
      else:
        $if: 'tasks_for == "github-pull-request"'
        then:
          $if: 'event.action in ["opened", "reopened", "synchronize"]'
          then: true
          else: false
        else: false
  in:
    - $if: run_task
      then:
        $let:
          event_str: {$json: {$eval: event}}
          scopes:
            $if: 'tasks_for == "github-push"'
            then:
              $let:
                branch:
                  $if: "event.ref[:11] == 'refs/heads/'"
                  then: "${event.ref[11:]}"
                  else: "${event.ref}"
              in: "assume:repo:github.com/${event.repository.full_name}:branch:${branch}"
            else: "assume:repo:github.com/${event.repository.full_name}:pull-request"
          rev:
            $if: 'tasks_for == "github-pull-request"'
            then: "refs/pull/${event.number}/merge"
            else: "${event.after}"
          owner:
            $if: 'tasks_for == "github-push"'
            then:
              $if: 'event.pusher.email'
              then:
                $if: '"@" in event.pusher.email'
                then: ${event.pusher.email}
                else: web-platform-tests@users.noreply.github.com
              else: web-platform-tests@users.noreply.github.com
            else: web-platform-tests@users.noreply.github.com
        in:
          created: {$fromNow: ''}
          deadline: {$fromNow: '24 hours'}
          provisionerId: proj-wpt
          workerType: ci
          metadata:
            name: "wpt-decision-task"
            description: "The task that creates all of the other tasks in the task graph"
            owner: ${owner}
            source: ${event.repository.clone_url}
          payload:
            image: webplatformtests/wpt:0.56
            maxRunTime: 7200
            artifacts:
              public/results:
                path: /home/test/artifacts
                type: directory
            command:
              - /bin/bash
              - --login
              - -c
              - set -ex;
                ~/start.sh
                  ${event.repository.clone_url}
                  ${rev};
                cd ~/web-platform-tests;
                ./wpt tc-decision --tasks-path=/home/test/artifacts/tasks.json
            features :
              taskclusterProxy: true
          scopes:
            - ${scopes}
          extra:
            github_event: "${event_str}"