Bug 1580778 - Migrate lint and ui-test tasks to taskgraph (#5430)
parent
057451178c
commit
c47f0f57ce
@ -0,0 +1,44 @@
|
||||
# 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/.
|
||||
---
|
||||
|
||||
loader: taskgraph.loader.transform:loader
|
||||
|
||||
transforms:
|
||||
- taskgraph.transforms.job:transforms
|
||||
- taskgraph.transforms.task:transforms
|
||||
|
||||
job-defaults:
|
||||
attributes:
|
||||
code-review: true
|
||||
worker-type: b-android
|
||||
worker:
|
||||
docker-image: {in-tree: base}
|
||||
max-run-time: 7200
|
||||
run:
|
||||
use-caches: false
|
||||
run-on-tasks-for: [github-pull-request, github-push]
|
||||
|
||||
jobs:
|
||||
detekt:
|
||||
description: 'Running detekt over all modules'
|
||||
run:
|
||||
using: gradlew
|
||||
gradlew: [detekt]
|
||||
ktlint:
|
||||
description: 'Running ktlint over all modules'
|
||||
run:
|
||||
using: gradlew
|
||||
gradlew: [ktlint]
|
||||
compare-locales:
|
||||
description: 'Validate strings.xml with compare-locales'
|
||||
run:
|
||||
using: run-task
|
||||
cwd: '{checkout}'
|
||||
command: 'pip install --user "compare-locales>=5.0.2,<6.0" && compare-locales --validate l10n.toml .'
|
||||
lint:
|
||||
description: 'Running tlint over all modules'
|
||||
run:
|
||||
using: gradlew
|
||||
gradlew: [lintDebug]
|
@ -0,0 +1,50 @@
|
||||
# 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/.
|
||||
---
|
||||
loader: taskgraph.loader.transform:loader
|
||||
|
||||
transforms:
|
||||
- taskgraph.transforms.job:transforms
|
||||
- taskgraph.transforms.task:transforms
|
||||
|
||||
job-defaults:
|
||||
description: Test Reference Browser
|
||||
treeherder:
|
||||
kind: test
|
||||
tier: 2
|
||||
worker-type: b-android
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
run:
|
||||
using: gradlew
|
||||
use-caches: false
|
||||
|
||||
jobs:
|
||||
ui:
|
||||
attributes:
|
||||
build-type: debug
|
||||
code-review: true
|
||||
treeherder:
|
||||
symbol: ui
|
||||
platform: 'ui-test/opt'
|
||||
run-on-tasks-for: [github-pull-request, github-push]
|
||||
run:
|
||||
# TODO Generate APKs in a build task instead
|
||||
gradlew: ['clean', 'assembleDebug', 'assembleAndroidTest']
|
||||
post-gradlew:
|
||||
- ['automation/taskcluster/androidTest/ui-test.sh', 'x86', '-1']
|
||||
secrets:
|
||||
- name: project/mobile/fenix/firebase
|
||||
key: firebaseToken
|
||||
path: .firebase_token.json
|
||||
json: true
|
||||
worker:
|
||||
docker-image: {in-tree: ui-tests}
|
||||
env:
|
||||
GOOGLE_APPLICATION_CREDENTIALS: '.firebase_token.json'
|
||||
GOOGLE_PROJECT: moz-fenix
|
||||
artifacts:
|
||||
- name: public
|
||||
path: /build/fenix/results
|
||||
type: directory
|
@ -0,0 +1,32 @@
|
||||
# %ARG DOCKER_IMAGE_PARENT
|
||||
FROM $DOCKER_IMAGE_PARENT
|
||||
MAINTAINER Richard Pappalardo <rpappalax@gmail.com>
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------------------
|
||||
#-- Test tools --------------------------------------------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
USER worker:worker
|
||||
|
||||
ENV GOOGLE_SDK_DOWNLOAD ./gcloud.tar.gz
|
||||
ENV GOOGLE_SDK_VERSION 233
|
||||
|
||||
ENV TEST_TOOLS /builds/worker/test-tools
|
||||
ENV PATH ${PATH}:${TEST_TOOLS}:${TEST_TOOLS}/google-cloud-sdk/bin
|
||||
|
||||
RUN mkdir -p ${TEST_TOOLS} && \
|
||||
mkdir -p ${HOME}/.config/gcloud
|
||||
|
||||
RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GOOGLE_SDK_VERSION}.0.0-linux-x86_64.tar.gz --output ${GOOGLE_SDK_DOWNLOAD} \
|
||||
&& tar -xvf ${GOOGLE_SDK_DOWNLOAD} -C ${TEST_TOOLS} \
|
||||
&& rm -f ${GOOGLE_SDK_DOWNLOAD} \
|
||||
&& ${TEST_TOOLS}/google-cloud-sdk/install.sh --quiet \
|
||||
&& ${TEST_TOOLS}/google-cloud-sdk/bin/gcloud --quiet components update
|
||||
|
||||
RUN URL_FLANK_BIN=$(curl -s "https://api.github.com/repos/TestArmada/flank/releases/latest" | grep "browser_download_url*" | sed -r "s/\"//g" | cut -d ":" -f3) \
|
||||
&& wget "https:${URL_FLANK_BIN}" -O ${TEST_TOOLS}/flank.jar \
|
||||
&& chmod +x ${TEST_TOOLS}/flank.jar
|
||||
|
||||
|
||||
# run-task expects to run as root
|
||||
USER root
|
Loading…
Reference in New Issue