-
Notifications
You must be signed in to change notification settings - Fork 3
/
cider-ci.yml
114 lines (106 loc) · 3.82 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
jobs:
build-uberjar:
name: Build uberjar
run_when: &DEFAULT_TRIGGERS
any branch matches:
type: branch
include_match: ^.+$
exclude_match: '^.*(no-ci|hotspot).*$'
context:
include: cider-ci/context-components/uberjar.yml
rspec-tests:
name: "RSpec Tests"
context:
include: cider-ci/context-components/rspec-tests.yml
depends_on: &UBERJAR
rspec tests: { type: job, job_key: build-uberjar, states: [passed]}
run_when: *UBERJAR
lint:
name: "Linting"
description: |
Code checks: static checks and metrics: complexity, duplication, and format,
also other consistency checks.
priority: 3
run_when: *DEFAULT_TRIGGERS
context:
task_defaults:
include: [cider-ci/task-components/env.yml]
environment_variables:
GIT_LINEAR_HISTORY_CHECK_START_SHA: d9b3e6a1d0397d7294e85a4a189d86aa843f1dfc
git_options:
submodules:
include_match: ^.*$
tasks:
ruby_spec_formatted:
scripts:
check:
body: |
#!/usr/bin/env bash
set -euo pipefail
./bin/check-ruby-spec-format
clojure_code_formatted:
scripts:
test:
body: |
#!/usr/bin/env bash
set -euo pipefail
cd ${API_DIR}
./bin/clj-fmt check src
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
depends_on: &ALL_TEST_DEPENDS
rspec tests: { type: job, job_key: rspec-tests, states: [passed]}
all-tests of the datalayer: {job_key: all-tests, type: job, submodule: [datalayer], states: [passed]}
run_when: *ALL_TEST_DEPENDS
context:
task: "echo '✔︎ All dependencies have passed' ; exit 0"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 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"