/
cider-ci.yml
97 lines (85 loc) · 3.33 KB
/
cider-ci.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
jobs:
rspec-tests:
name: "RSpec Tests"
run_when: &DEFAULT_TRIGGERS
the branch does not match no-ci or _wip_:
type: branch
include_match: &default_branch_match ^.+$
exclude_match: &default_branch_exclude ^(.*no-ci.*)|([a-z]*_wip_.*)$
context:
include: cider-ci/rspec-tests.yml
precompilation-checks:
name: "Precompilation"
run_when: *DEFAULT_TRIGGERS
context:
include: cider-ci/context-components/precompilation.yml
lint:
name: 'Linting'
description: |
Code checks: static checks and metrics: complexity, duplication, and format, git checks
priority: 3
run_when: *DEFAULT_TRIGGERS
context:
include: [cider-ci/context-components/env.yml]
task_defaults:
environment_variables:
GIT_LINEAR_HISTORY_CHECK_START_SHA: 0dd0528dbb6a2eeb39770403c166550e6c597aad
contexts:
include:
- path: cider-ci/context-components/lint/git-lint.yml
submodule: [datalayer]
- path: cider-ci/context-components/lint/rspec-lint.yml
submodule: [datalayer]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# META JOBS (only depend on other jobs) #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
all-tests:
name: "All tests"
description: |
This job depends on all unit jobs that need to pass.
It is depended upon by the super-project!
*Note that there still be more requirements for actually pushing to `origin`,
look in job **"Good to Merge"**!*
priority: 999 # "empty" job = high priority
context:
task: "echo '✔︎ All dependencies have passed' ; exit 0"
depends_on: &ALL_TEST_DEPENDS
rspec-tests: {job_key: rspec-tests, type: job, states: [passed]}
lint: {job_key: lint, type: job, states: [passed]}
all-tests of the datalayer: {job_key: all-tests, type: job, submodule: [datalayer], states: [passed]}
run_when: *ALL_TEST_DEPENDS
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# GITHUB BRANCH PROTECTION #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
good-to-merge:
name: "⚑ Good To Merge"
description: |
This job depends on all jobs that need to pass for "Delivery".
It is depended upon by GitHub's branch protection (for `master`)!
priority: 999 # "delivery" job = high priority
context:
include:
- path: cider-ci/context-components/env.yml
- submodule: [datalayer]
path: cider-ci/context-components/merge-checks.yml
depends_on: &GOOD_TO_MERGE_DEPS
all-tests: {job_key: all-tests, type: job, states: [passed]}
good to merge of the datalayer: {job_key: merged-to-master, type: job, submodule: [datalayer], states: [passed]}
run_when: *GOOD_TO_MERGE_DEPS
merged-to-master:
name: "Merged to master"
priority: 999
depends_on:
master branch matches:
type: branch
include_match: ^master$
run_when:
master branch matches:
type: branch
include_match: ^master$
context:
tasks:
merged-to-master:
scripts:
test:
body: "exit 0"