-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.taskcluster.yml
55 lines (55 loc) · 1.7 KB
/
.taskcluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: 1
policy:
pullRequests: public
tasks:
$let:
head_rev:
$if: tasks_for == "github-pull-request"
then: ${event.pull_request.head.sha}
else: ${event.after}
repository:
$if: tasks_for == "github-pull-request"
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
environments:
- image: node:18
description: Run tests with node v18
command: yarn test
- image: node:latest
description: Run tests with latest node
command: yarn test
- image: node:latest
description: Run tests with latest node without Buffer
command: yarn run test-nobuffer
in:
$if: tasks_for == "github-pull-request" && event["action"] in ["opened","reopened","synchronize"]
then:
$map: {$eval: environments}
each(env):
taskId: {$eval: as_slugid(env.image + ":tests")}
deadline:
$fromNow: 1 day
taskQueueId: proj-taskcluster/ci
metadata:
name: ${env.image} tests
description: ${env.description}
owner: ${event.sender.login}@users.noreply.github.com
source: ${event.repository.url}
payload:
maxRunTime: 3600
image: ${env.image}
command:
- /bin/bash
- '--login'
- '-c'
- >-
set -o xtrace &&
git --version &&
node -v &&
yarn -v &&
git clone --no-progress ${repository} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout --no-progress ${head_rev} &&
yarn install &&
${env.command}