-
Notifications
You must be signed in to change notification settings - Fork 0
/
cider-ci.yml
124 lines (117 loc) · 3.37 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
115
116
117
118
119
120
121
122
123
124
include: container-build/cider-ci.yml
jobs:
inventory-build-uberjar:
name: Build inventory uberjar
run_when: &ON_BRANCH_UPDATE
any branch has been updated:
type: branch
include_match: ^.*$
exclude_match: '^.*(no-ci|hotspot).*$'
context:
task_defaults: &INVENTORY_TASK_DEFAULTS
environment_variables:
CI: "true"
LEIHS_INVENTORY_DIR: "{{CIDER_CI_WORKING_DIR}}"
LEIHS_DATABASE_DIR: "{{LEIHS_INVENTORY_DIR}}/database"
DIST_INVENTORY_IMAGE_NAME: "leihs-inventory"
DIST_VERSION_NAME: "trial-{{CIDER_CI_TRIAL_ID}}"
tasks:
inventory-build-uberjar: { include: cider-ci/task-components/uberjar.yml }
check-feature-tasks:
name: Check if feature tasks are up to date
run_when: *ON_BRANCH_UPDATE
context:
include: cider-ci/jobs/feature_tasks_check.yml
specs:
name: Run specs
depends_on: &SPEC_DEPENDS
uberjar passed:
type: job
job_key: inventory-build-uberjar
states: [passed]
feature tasks are up todate:
type: job
job_key: check-feature-tasks
states: [passed]
run_when: *SPEC_DEPENDS
context:
task_defaults: *INVENTORY_TASK_DEFAULTS
include:
- cider-ci/specs_job-context.yml
clojure-tests:
name: Run clojure-tests
depends_on: &SPEC_DEPENDS
uberjar passed:
type: job
job_key: inventory-build-uberjar
states: [passed]
run_when: *SPEC_DEPENDS
context:
task_defaults: *INVENTORY_TASK_DEFAULTS
include:
- cider-ci/task-components/clojure-tests.yml
lint:
name: "Linting"
description: |
Code checks: static checks and metrics: complexity, duplication, and format,
also other consistency checks.
priority: 3
run_when:
any branch has been updated:
type: branch
include_match: ^.*$
exclude_match: '^.*(no-ci|hotspot).*$'
context:
task_defaults:
environment_variables:
LEIHS_INVENTORY_DIR: "{{CIDER_CI_WORKING_DIR}}"
git_options:
submodules:
include_match: ^.*$
tasks:
js-lint:
scripts:
test:
body: |
#!/usr/bin/env bash
set -euo pipefail
./bin/jslint
cljc-lint:
scripts:
test:
body: |
#!/usr/bin/env bash
set -euo pipefail
./bin/cljfmt check
standardrb-lint:
scripts:
test:
body: |
#!/usr/bin/env bash
set -euo pipefail
cd ${LEIHS_INVENTORY_DIR}
standardrb
good-to-merge:
name: ⚑ Good To Merge
description: |
This job depends on all other tests and checks
and it will pass if and only if all dependencies have passed.
Status of this job is **used by github's "branch protection"**!
include: cider-ci/good-to-merge_job-context.yml
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"