Permalink
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (55 sloc) 1.9 KB
version: 1
policy:
pullRequests: public
tasks:
- $if: 'tasks_for == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"]'
then:
taskId: {$eval: as_slugid("pr_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: aws-provisioner-v1
workerType: github-worker
scopes:
- secrets:get:project/taskcluster/testing/taskcluster-github
payload:
maxRunTime: 600
image: "node:8"
env:
DEBUG: "* -mocha* -nock* -express* -body-parser* -eslint*"
features:
taskclusterProxy: true
command:
- "/bin/bash"
- "-lc"
- "git clone ${event.pull_request.head.repo.git_url} repo && cd repo && git checkout ${event.pull_request.head.sha} && yarn && yarn test"
metadata:
name: "Taskcluster GitHub Tests"
description: "All tests"
owner: ${event.pull_request.user.login}@users.noreply.github.com
source: ${event.repository.url}
- $if: 'tasks_for == "github-push"'
then:
taskId: {$eval: as_slugid("push_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: aws-provisioner-v1
workerType: github-worker
scopes:
- secrets:get:project/taskcluster/testing/taskcluster-github
payload:
maxRunTime: 600
image: "node:8"
env:
DEBUG: "* -mocha* -nock* -express* -body-parser* -eslint*"
NO_TEST_SKIP: true
features:
taskclusterProxy: true
command:
- "/bin/bash"
- "-lc"
- "git clone ${event.repository.url} repo && cd repo && git checkout ${event.after} && yarn && yarn test"
metadata:
name: "Taskcluster GitHub Tests"
description: "All tests"
owner: ${event.pusher.name}@users.noreply.github.com
source: ${event.repository.url}