# 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/.
---
task-defaults:
    platform: linux64/opt
    treeherder:
        kind: test
        tier: 2
    worker-type: t-linux-docker
    worker:
        docker-image: {in-tree: "lint"}
        max-run-time: 1800

upload:
    description: Generate and store the web-platform-tests manifest
    treeherder:
        symbol: Wm
    index:
        product: source
        job-name: manifest-upload
        rank: build_date
    run:
        using: run-task
        cwd: '{checkout}'
        command: >
            ./mach wpt-manifest-update --config testing/web-platform/wptrunner.ini --no-download
            && tar -cvzf manifests.tar.gz -C testing/web-platform/ meta/MANIFEST.json mozilla/meta/MANIFEST.json
    worker:
        artifacts:
            - type: file
              path: /builds/worker/checkouts/gecko/manifests.tar.gz
              name: public/manifests.tar.gz

        max-run-time: 3600
    when:
        files-changed:
            - 'testing/web-platform/tests/**'
            - 'testing/web-platform/mozilla/tests/**'
