|
45 | 45 | - ['treescript', '37', '', '']
|
46 | 46 | - ['treescript', '38', '', 'mozilla/releng-treescript']
|
47 | 47 | - ['pypiscript', '38', '', 'mozilla/releng-pypiscript']
|
| 48 | + - ['rust', 'rust', '', ''] |
48 | 49 | # -------------------------------------------------------------------------
|
49 | 50 |
|
50 | 51 | HEAD_REV:
|
|
69 | 70 | $if: 'tasks_for == "github-push" && event.ref[0:11] == "refs/heads/"'
|
70 | 71 | then: '${event.ref[11:]}'
|
71 | 72 | else: 'unknown'
|
| 73 | + |
| 74 | + rust_version: 1.43 |
72 | 75 | in:
|
73 | 76 | $flatten:
|
74 | 77 | $map: { "$eval": "PROJECTS" }
|
@@ -116,7 +119,7 @@ tasks:
|
116 | 119 | in:
|
117 | 120 | $match:
|
118 | 121 | # Run code linting and unit tests for each project
|
119 |
| - 'run_tests == "1"': |
| 122 | + 'run_tests == "1" && project_name != "rust"': |
120 | 123 | taskId: '${as_slugid(project_name + python_version)}'
|
121 | 124 | provisionerId: 'releng-t'
|
122 | 125 | workerType: 'linux'
|
@@ -148,6 +151,39 @@ tasks:
|
148 | 151 | description: 'Code linting and unit tests for ${project_name} on python ${python_version[0]}.${python_version[1]}'
|
149 | 152 | owner: '${OWNER}'
|
150 | 153 | source: '${REPO_URL}/raw/${HEAD_REV}/.taskcluster.yml'
|
| 154 | + 'run_tests == "1" && project_name == "rust"': |
| 155 | + taskId: '${as_slugid(rust)}' |
| 156 | + provisionerId: 'releng-t' |
| 157 | + workerType: 'linux' |
| 158 | + created: { $fromNow: '' } |
| 159 | + deadline: { $fromNow: '4 hours' } |
| 160 | + payload: |
| 161 | + maxRunTime: 3600 |
| 162 | + image: 'rust:${rust_version}' |
| 163 | + command: |
| 164 | + - sh |
| 165 | + - -lxce |
| 166 | + - >- |
| 167 | + cd /tmp && |
| 168 | + wget ${REPO_URL}/archive/${HEAD_REV}.tar.gz && |
| 169 | + tar zxf ${HEAD_REV}.tar.gz && |
| 170 | + mv scriptworker-scripts-${HEAD_REV} /src && |
| 171 | + cd /src && ${setup_command} |
| 172 | + cargo test && cargo clippy |
| 173 | + pip install tox && |
| 174 | + tox -e ${project_name}-py${python_version} |
| 175 | + metadata: |
| 176 | + name: |
| 177 | + $let: |
| 178 | + test_task_number: |
| 179 | + $if: 'dockerhub_repo != ""' |
| 180 | + then: '${i+1}.1' |
| 181 | + else: '${i+1}' |
| 182 | + in: |
| 183 | + '${number_prefix}${test_task_number}. ${project_name}-py${python_version}: Run tox [on ${BRANCH_NAME}]' |
| 184 | + description: 'Code linting and unit tests for rust code on rust ${rust_version}' |
| 185 | + owner: '${OWNER}' |
| 186 | + source: '${REPO_URL}/raw/${HEAD_REV}/.taskcluster.yml' |
151 | 187 | # Build docker image and (optionally) push to docker hub
|
152 | 188 | 'run_tests == "1" && dockerhub_repo != ""':
|
153 | 189 | taskId: '${as_slugid(project_name + "docker_build_and_push")}'
|
|
0 commit comments