Show credo diff in CI

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-01-18 14:17:48 +01:00
parent 880c4fdf6b
commit b70ed5a76e
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -59,8 +59,11 @@ lint-elixir:
- mix deps.get - mix deps.get
script: script:
- export EXITVALUE=0 - export EXITVALUE=0
- git fetch origin ${CI_DEFAULT_BRANCH}
- TARGET_SHA1=$(git show-ref -s ${CI_DEFAULT_BRANCH})
- echo "$TARGET_SHA1"
- mix format --check-formatted --dry-run || export EXITVALUE=1 - mix format --check-formatted --dry-run || export EXITVALUE=1
- mix credo --strict -a || export EXITVALUE=1 - mix credo diff --from-git-merge-base $TARGET_SHA1 --strict -a || export EXITVALUE=1
- mix sobelow --config || export EXITVALUE=1 - mix sobelow --config || export EXITVALUE=1
- exit $EXITVALUE - exit $EXITVALUE