-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.taskcluster.yml
70 lines (70 loc) · 2.55 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
version: 1
policy:
pullRequests: public
tasks:
- $if: '(tasks_for == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"])'
then:
taskId: { $eval: as_slugid("test") }
created: { $fromNow: "" }
deadline: { $fromNow: "2 hours" }
provisionerId: proj-taskcluster
workerType: ci
payload:
maxRunTime: 3600
image: taskcluster/monopacker:build
command:
- /bin/bash
- --login
- -cxe
- |
CHECKOUT_DIR="/monopacker_checkout"
git clone "${event.pull_request.head.repo.clone_url}" "$CHECKOUT_DIR"
cd "$CHECKOUT_DIR"
git checkout "${event.pull_request.head.sha}"
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
export PATH="/root/.local/bin:$PATH"
poetry config virtualenvs.in-project true
poetry install --no-ansi
poetry run pip list
poetry run pytest
poetry update --no-ansi
if ! output=$(git status --porcelain) || [ -n "$output" ]; then
echo "*** 'poetry update' produced changes to the repository; these changes should be checked in ***";
git --no-pager diff;
exit 1;
fi
metadata:
name: monopacker tests
description: runs tests, validates default packer builders
owner: [email protected]
source: ${event.pull_request.head.repo.url}
- $if: 'tasks_for == "github-push"'
then:
taskId: { $eval: as_slugid("test") }
created: { $fromNow: "" }
deadline: { $fromNow: "2 hours" }
provisionerId: proj-taskcluster
workerType: ci
payload:
maxRunTime: 3600
image: taskcluster/monopacker:build
command:
- /bin/bash
- --login
- -cxe
- |
CHECKOUT_DIR="/monopacker_checkout"
git clone "${event.repository.url}" "$CHECKOUT_DIR"
cd "$CHECKOUT_DIR"
git checkout "${event.after}"
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
export PATH="/root/.local/bin:$PATH"
poetry config virtualenvs.in-project true
poetry install --no-ansi
poetry run pip list
poetry run pytest
metadata:
name: monopacker tests
description: runs tests, validates default packer builders
owner: [email protected]
source: ${event.repository.url}