-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.1 KB
/
validate.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
name: Check bpmn processes have been linted
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
jobs:
lint:
if: "!contains(github.event.pull_request.head.ref, 'renovate') && !contains(github.event.pull_request.head.ref, 'dependabot')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check processes have name
uses: mikefarah/yq@master
with:
cmd: >
for file in src/main/resources/camunda/*.bpmn;
do
if ! yq -oy -e -p xml '.definitions.process.+@name' "$file";
then
echo "Process $file does not have a name" >&2;
exit 1;
fi;
done
- name: Check BPMN processes have camunda:historyTimeToLive
run: |
for file in src/main/resources/camunda/*.bpmn;
do
if ! yq -r -p xml '.["bpmn:definitions"]["bpmn:process"]["@camunda:historyTimeToLive"]' "$file"; then
echo "Process $file does not have camunda:historyTimeToLive attribute" >&2
exit 1
fi
done