Skip to content

Commit 5e69eb4

Browse files
author
Benjamin Muskalla
committed
Generate diff and archive results
1 parent 734422f commit 5e69eb4

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/java-model-diff.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,25 @@ jobs:
7474
analyzeDatabaseWithCheckout "baseline" $d
7575
analyzeDatabaseWithCheckout "head" $d
7676
done
77+
- name: Generate Model Diff
78+
run: |
79+
set -x
80+
npm install -g diff2html-cli
81+
MODELS=`pwd`/tmp-models
82+
ls -1 tmp-models/
83+
for m in $MODELS/*_baseline.qll ; do
84+
t="${m/baseline/"head"}"
85+
basename=`basename $m`
86+
name="diff_${basename/_baseline.qll/""}"
87+
(diff -w -u $m $t | diff2html -i stdin -F $MODELS/$name.html) || true
88+
done
89+
- uses: actions/upload-artifact@v2
90+
with:
91+
name: models
92+
path: tmp-models/*.qll
93+
retention-days: 20
94+
- uses: actions/upload-artifact@v2
95+
with:
96+
name: diffs
97+
path: tmp-models/*.html
98+
retention-days: 20

0 commit comments

Comments
 (0)