CI: compliance: fail on errors

Fail workflow in case of script crashes.

This patch is a cherry-pick of a zephyr patch implemented by
Anas Nashif:

https://github.com/zephyrproject-rtos/zephyr/pull/31452

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
This commit is contained in:
Arnaud Pouliquen
2021-03-19 17:18:22 +01:00
parent 278bcd2d10
commit a44dbaca7e

View File

@@ -32,7 +32,7 @@ jobs:
git config --global user.name "Your Name"
git rebase origin/${BASE_REF}
export
./scripts/ci/check_compliance.py -m checkpatch -m Gitlint -m Identity -c origin/${BASE_REF}.. || true
./scripts/ci/check_compliance.py -m checkpatch -m Gitlint -m Identity -c origin/${BASE_REF}..
- name: upload-results
uses: actions/upload-artifact@master
@@ -43,6 +43,9 @@ jobs:
- name: check-warns
run: |
if [[ ! -s "compliance.xml" ]]; then
exit 1;
fi
if [ -s checkpatch.txt ]; then
errors=$(cat checkpatch.txt)
errors="${errors//'%'/'%25'}"