Skip to content

Commit 4d62c9b

Browse files
committed
Put || true so a pylint error doesn't stop the process
1 parent ee14064 commit 4d62c9b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/build_docs.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
pip install .[lint]
7575
- name: Run Pylint and Generate Report
7676
run: |
77-
pylint sdynpy --output-format=json > pylint-report.json
77+
pylint sdynpy --output-format=json > pylint-report.json || true
7878
- name: Convert Pylint to HTML
7979
run: |
8080
pylint-json2html -o pylint-report.html pylint-report.json
@@ -95,11 +95,15 @@ jobs:
9595
- name: Compute pylint score
9696
shell: bash
9797
run: |
98-
SCORE=$(
99-
pylint sdynpy -sn --score=y 2>/dev/null \
100-
| sed -n 's/^Your code has been rated at \([0-9.]\+\)\/10.*/\1/p' \
101-
| tail -n 1
102-
)
98+
set -o pipefail
99+
100+
OUT="$( (pylint sdynpy -sn --score=y 2>&1) || true )"
101+
echo "$OUT"
102+
103+
SCORE="$(printf '%s\n' "$OUT" \
104+
| sed -n 's/^Your code has been rated at \([0-9.]\+\)\/10.*/\1/p' \
105+
| tail -n 1)"
106+
103107
[ -n "$SCORE" ] || SCORE="0.00"
104108
echo "PYLINT_SCORE=$SCORE" >> "$GITHUB_ENV"
105109
- name: Write Shields endpoint JSON (color by score)

0 commit comments

Comments
 (0)