summaryrefslogtreecommitdiffstats
path: root/taskcluster/ci/source-test/node.yml
blob: f1df46b73ded01f2b54cab4914540b504bd2dd15 (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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
newtab-unit-tests:
    description: newtab unit tests
    platform: linux1804-64/opt
    treeherder:
        symbol: node(newtab)
        kind: test
        tier: 1
    worker-type: t-linux-xlarge-source
    worker:
        docker-image: {in-tree: "ubuntu1804-test"}
        max-run-time: 1800
    require-build:
        by-project:
            autoland:
                linux1804-64/opt: build-linux64/opt
            try:
                linux1804-64/opt: build-linux64/opt
            default:
                linux1804-64/opt: build-linux64-shippable/opt
    run:
        using: run-task
        cache-dotcache: true
        cwd: '{checkout}'
        command: >
            cd /builds/worker/checkouts/gecko &&
            rm -rf node_modules &&
            npm ci &&
            cd /builds/worker/checkouts/gecko/browser/components/aboutwelcome &&
            rm -rf node_modules &&
            npm ci &&
            cd /builds/worker/checkouts/gecko/browser/components/asrouter &&
            rm -rf node_modules &&
            npm ci &&
            cd /builds/worker/checkouts/gecko/browser/components/newtab &&
            rm -rf node_modules &&
            npm ci &&
            node bin/try-runner.js
    when:
        files-changed:
            - "browser/components/newtab/**"
            - "browser/components/aboutwelcome/**"
            - "browser/components/asrouter/**"

newtab-unit-tests-ccov:
    description: newtab unit tests code coverage
    platform: linux1804-64/opt
    treeherder:
        symbol: node(newtab-ccov)
        kind: test
        tier: 1
    worker-type: t-linux-xlarge-source
    worker:
        docker-image: {in-tree: "ubuntu1804-test"}
        max-run-time: 1800
        artifacts:
            - name: public/code-coverage-grcov.zip
              path: /builds/worker/checkouts/gecko/browser/components/newtab/logs/coverage/code-coverage-grcov.zip
              type: file
    require-build:
        by-project:
            try:
                linux1804-64/opt: build-linux64/opt
            default:
                linux1804-64/opt: build-linux64-shippable/opt
    run:
        using: run-task
        cache-dotcache: true
        cwd: '{checkout}'
        command: >
            cd /builds/worker/checkouts/gecko &&
            rm -rf node_modules &&
            npm ci &&
            cd /builds/worker/checkouts/gecko/browser/components/aboutwelcome &&
            rm -rf node_modules &&
            npm ci &&
            cd /builds/worker/checkouts/gecko/browser/components/asrouter &&
            rm -rf node_modules &&
            npm ci &&
            cd /builds/worker/checkouts/gecko/browser/components/newtab &&
            rm -rf node_modules &&
            npm ci &&
            node bin/try-runner.js
    # This should only run on mozilla-central, as the bot will only parse mozilla-central
    # coverage anyways.
    run-on-projects: ["mozilla-central"]
    # Note the lack of a "when" rule here. This is to avoid seeing fluctuating
    # coverage on coverage.moz.tools / searchfox depending on whether the latest
    # push contained patches touching these files or not.

devtools-tests:
    description: devtools node-based tests (for instance jest)
    platform: linux1804-64/opt
    attributes:
        code-review: true
    treeherder:
        symbol: node(devtools)
        kind: test
        tier: 1
    worker-type: t-linux-xlarge-source
    worker:
        docker-image: {in-tree: "lint"}
        max-run-time: 1800
        artifacts:
            - type: file
              name: public/code-review/issues.json
              path: /builds/worker/issues.json
    run:
        using: run-task
        cache-dotcache: true
        cwd: '{checkout}'
        # Re-use rather than re-installing to avoid hitting/requiring
        # nodejs servers for downloads
        command: >
            cp -r /build/node_modules_eslint node_modules &&
            cp -r /build/node_modules_eslint-plugin-mozilla/ tools/lint/eslint/eslint-plugin-mozilla/node_modules &&
            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
            cd devtools/client/bin/ &&
            node devtools-node-test-runner.js --suite=all --artifact=/builds/worker/issues.json
    when:
        files-changed:
            - 'devtools/client/**'
            - 'devtools/shared/**'

devtools-verify-bundle:
    description: devtools bundle checker
    platform: linux1804-64/opt
    attributes:
        code-review: true
    treeherder:
        symbol: node(devtools-bundle)
        kind: test
        tier: 2
    worker-type: t-linux-xlarge-source
    worker:
        docker-image: {in-tree: "lint"}
        max-run-time: 1200
        artifacts:
            - type: file
              name: public/code-review/issues.json
              path: /builds/worker/issues.json
    run:
        using: run-task
        cache-dotcache: true
        cwd: '{checkout}'
        # Re-use rather than re-installing to avoid hitting/requiring
        # nodejs servers for downloads
        command: >
            cp -r /build/node_modules_eslint node_modules &&
            cp -r /build/node_modules_eslint-plugin-mozilla/ tools/lint/eslint/eslint-plugin-mozilla/node_modules &&
            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
            cd devtools/client/debugger &&
            yarn &&
            node bin/bundle.js &&
            cd ../../.. &&
            ./mach python taskcluster/scripts/misc/verify-devtools-bundle.py --output /builds/worker/issues.json
    when:
        files-changed:
            - 'devtools/**'

eslint-plugin-mozilla:
    description: eslint-plugin-mozilla integration tests
    platform: linux1804-64/opt
    treeherder:
        symbol: node(epm)
        kind: test
        tier: 1
    worker-type: t-linux-xlarge-source
    worker:
        docker-image: {in-tree: "lint"}
        max-run-time: 1800
    run:
        using: run-task
        cache-dotcache: true
        cwd: '{checkout}/tools/lint/eslint/eslint-plugin-mozilla'
        command: >
            cp -r /build/node_modules_eslint-plugin-mozilla node_modules &&
            npm run test
    when:
        files-changed:
            - 'tools/lint/eslint/eslint-plugin-mozilla/**'