forked from osl-incubator/makim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.makim.yaml
198 lines (185 loc) · 7.77 KB
/
.makim.yaml
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
version: 1.0.0
groups:
default:
targets:
clean:
help: Clean unnecessary temporary files
run: |
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name
find . -name '__pycache__' -exec rm -fr '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +{} +
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
docs:
targets:
build:
help: Build documentation
run: |
mkdocs build --config-file docs/mkdocs.yaml
preview:
help: Preview documentation page locally
run: mkdocs serve --watch docs --config-file docs/mkdocs.yaml
release:
vars:
app: |
npx --yes \
-p semantic-release \
-p "@semantic-release/commit-analyzer" \
-p "@semantic-release/release-notes-generator" \
-p "@semantic-release/changelog" \
-p "@semantic-release/exec" \
-p "@semantic-release/github" \
-p "@semantic-release/git" \
-p "@google/semantic-release-replace-plugin" \
semantic-release
targets:
ci:
help: Run semantic release on CI
run: {{ vars.app }} '--ci'
dry:
help: Run semantic release in dry-run mode
run: {{ vars.app }} '--dry-run'
tests:
targets:
lint:
help: Run linter tools
run: pre-commit run --all-files --verbose
unittest:
help: Run tests
run: pytest -s -vv tests
smoke-tests:
targets:
simple:
help: Test makim using a simple makimfile
args:
verbose-mode:
help: Run the all the tests in verbose mode
type: bool
action: store_true
env:
MAKIM_FILE: ./tests/.makim-simple.yaml
VERBOSE_FLAG: '{{ "--verbose" if args.verbose_mode else "" }}'
shell: bash
run: |
makim --makim-file $MAKIM_FILE --help
makim --makim-file $MAKIM_FILE --version
makim --makim-file $MAKIM_FILE clean $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE default.clean $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE build $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE default.build $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE build --clean $VERBOSE_FLAG
complex:
help: Test makim using a complex makimfile
env:
MAKIM_FILE: ./tests/.makim-complex.yaml
VERBOSE_FLAG: '{{ "--verbose" if args.verbose_mode else "" }}'
args:
verbose-mode:
help: Run the all the tests in verbose mode
type: bool
action: store_true
shell: bash
run: |
makim --makim-file $MAKIM_FILE --help
makim --makim-file $MAKIM_FILE --version
makim --makim-file $MAKIM_FILE default.lint --verbose
makim --makim-file $MAKIM_FILE build.clean-gcda --verbose
makim --makim-file $MAKIM_FILE build.clean --verbose
makim --makim-file $MAKIM_FILE build.install --verbose
makim --makim-file $MAKIM_FILE build.release --verbose
makim --makim-file $MAKIM_FILE build.release --build-type debug --verbose
makim --makim-file $MAKIM_FILE build.release --extras '-D' --verbose
makim --makim-file $MAKIM_FILE build.release --clean --verbose
makim --makim-file $MAKIM_FILE build.dev --verbose
makim --makim-file $MAKIM_FILE env.create-file --verbose
makim --makim-file $MAKIM_FILE conda.build --verbose
makim --makim-file $MAKIM_FILE release.ci --verbose
makim --makim-file $MAKIM_FILE release.dry --verbose
makim --makim-file $MAKIM_FILE docs.api --verbose
makim --makim-file $MAKIM_FILE docs.build --verbose
makim --makim-file $MAKIM_FILE docs.clean --verbose
makim --makim-file $MAKIM_FILE docs.preview --verbose
makim --makim-file $MAKIM_FILE tests.sanitizer --verbose
makim --makim-file $MAKIM_FILE tests.code-coverage --verbose
makim --makim-file $MAKIM_FILE tests.gen-object --verbose
makim --makim-file $MAKIM_FILE tests.gen-ast --verbose
makim --makim-file $MAKIM_FILE tests.gen-llvm-ir --verbose
makim --makim-file $MAKIM_FILE tests.examples --verbose
makim --makim-file $MAKIM_FILE tests.all --verbose
makim --makim-file $MAKIM_FILE debug.fibonacci --verbose
makim --makim-file $MAKIM_FILE print.local-env-vars --verbose
makim --makim-file $MAKIM_FILE print.makim-env-vars --verbose
makim --makim-file $MAKIM_FILE print.dotenv-var --verbose
makim --makim-file $MAKIM_FILE print.nested --verbose
containers:
help: Test makim with containers-sugar
env:
MAKIM_FILE: .makim-complex.yaml
VERBOSE_FLAG: '{{ "--verbose" if args.verbose_mode else "" }}'
args:
verbose-mode:
help: Run the all the tests in verbose mode
type: bool
action: store_true
shell: bash
run: |
cd ./tests/
makim --makim-file $MAKIM_FILE containers.run --verbose
unittest:
help: Test makim using a unittest makimfile
args:
verbose-mode:
help: Run the all the tests in verbose mode
type: bool
action: store_true
env:
MAKIM_FILE: ./tests/.makim-unittest.yaml
VERBOSE_FLAG: '{{ "--verbose" if args.verbose_mode else "" }}'
shell: bash
run: |
makim --makim-file $MAKIM_FILE --help
makim --makim-file $MAKIM_FILE --version
makim --makim-file $MAKIM_FILE tests.test-1 $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-2 --all $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-3-a $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-3-b $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-4 $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-4 --trigger-dep $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-5 $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE tests.test-6 $VERBOSE_FLAG
vars-env:
help: Test makim using env makimfile
args:
verbose-mode:
help: Run the all the tests in verbose mode
type: bool
action: store_true
env:
MAKIM_FILE: ./tests/.makim-env.yaml
VERBOSE_FLAG: '{{ "--verbose" if args.verbose_mode else "" }}'
shell: bash
run: |
makim --makim-file $MAKIM_FILE --help
makim --makim-file $MAKIM_FILE --version
makim --makim-file $MAKIM_FILE global-scope.test-var-env-file $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE global-scope.test-var-env $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE group-scope.test-var-env-file $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE group-scope.test-var-env $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE target-scope.test-var-env-file $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE target-scope.test-var-env $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE rerender-env.from-global $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE rerender-env.from-group $VERBOSE_FLAG
makim --makim-file $MAKIM_FILE rerender-env.from-target $VERBOSE_FLAG
bash:
help: ...
run: |
makim --makim-file tests/.makim-bash-main-scope.yaml main-scope.test
makim --makim-file tests/.makim-bash-group-scope.yaml group-scope.test
makim --makim-file tests/.makim-bash-target-scope.yaml target-scope.test