# 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:
    - fenix_taskgraph.transforms.test:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.task:transforms

kind-dependencies:
    - toolchain


job-defaults:
    attributes:
        retrigger: true
    description: Test Fenix
    fetches:
        toolchain:
            - android-sdk-linux
            - android-gradle-dependencies
    include-pull-request-number: false
    run:
        using: gradlew
        use-caches: false
    treeherder:
        kind: test
        tier: 2
    worker-type: b-android
    worker:
        docker-image: {in-tree: base}
        max-run-time: 7200

jobs:
    debug:
        attributes:
            build-type: debug
            code-review: true
        run:
            gradlew:
                - 'clean'
                - '-Pcoverage'
                - 'jacocoDebugTestReport'
                - 'githubTestDetails'
            post-gradlew:
                - ['automation/taskcluster/upload_coverage_report.sh']
            secrets:
                - name: project/mobile/fenix/public-tokens
                  key: codecov
                  path: .cc_token
        treeherder:
            platform: 'android-all/opt'
            symbol: debug(T)
            tier: 1
        worker:
            artifacts:
                - name: public/reports/index.html
                  path: /builds/worker/checkouts/src/app/build/reports/tests/testDebugUnitTest/index.html
                  type: file
                - name: public/reports/test
                  path: /builds/worker/checkouts/src/app/build/reports/tests
                  type: directory
                - name: public/github
                  path: /builds/worker/github
                  type: directory
