forked from GothenburgBitFactory/taskchampion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.taskcluster.yml
98 lines (98 loc) · 3 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: 1
reporting: checks-v1
policy:
pullRequests: public
tasks:
$if: 'tasks_for in ["github-push", "github-pull-request"]'
then:
$let:
run:
$if: 'tasks_for == "github-push"'
then: true
else: {$eval: 'event.action in ["opened", "reopened", "synchronize"]'}
repo_url:
$if: 'tasks_for == "github-push"'
then: ${event.repository.clone_url}
else: ${event.pull_request.head.repo.clone_url}
ref:
$if: 'tasks_for == "github-push"'
then: ${event.after}
else: ${event.pull_request.head.sha}
in:
- $if: run
then:
provisionerId: 'proj-misc'
workerType: 'ci'
deadline: {$fromNow: '1 hour'}
expires: {$fromNow: '1 day'}
payload:
maxRunTime: 3600
image: rust:latest
command:
- /bin/bash
- '-c'
- >-
rustup component add rustfmt &&
git clone ${repo_url} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout ${ref} &&
cargo test
metadata:
name: taskchampion-tests
description: Run tests for taskchampion
owner: [email protected]
source: ${repo_url}
- $if: run
then:
provisionerId: 'proj-misc'
workerType: 'ci'
deadline: {$fromNow: '1 hour'}
expires: {$fromNow: '1 day'}
payload:
maxRunTime: 3600
image: rust:latest
command:
- /bin/bash
- '-c'
- >-
rustup component add rustfmt &&
git clone ${repo_url} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout ${ref} &&
rustup component add clippy-preview &&
cargo clippy &&
cargo fmt -- --check
metadata:
name: taskchampion-clippy
description: Run clippy and rustfmt for taskchampion
owner: [email protected]
source: ${repo_url}
- $if: run
then:
provisionerId: 'proj-misc'
workerType: 'ci'
deadline: {$fromNow: '1 hour'}
expires: {$fromNow: '1 day'}
payload:
maxRunTime: 3600
image: rust:latest
command:
- /bin/bash
- '-c'
- >-
git clone ${repo_url} repo &&
cd repo &&
git config advice.detachedHead false &&
git checkout ${ref} &&
cd docs &&
curl -L --compressed https://github.com/rust-lang/mdBook/releases/download/v0.4.4/mdbook-v0.4.4-x86_64-unknown-linux-gnu.tar.gz | gunzip -c | tar -xf - &&
chmod +x mdbook &&
./mdbook test &&
./mdbook build
metadata:
name: taskchampion-book
description: Verify that the docs build with mdbook
owner: [email protected]
source: ${repo_url}