Skip to content

Commit

Permalink
Update reproducibility-checker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Feb 5, 2024
1 parent d504fce commit 1fa26f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/reproducibility-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ jobs:
- name: Lint Jupyter Notebooks
run: |
find ./book/chapters/ -type f -name '*.ipynb' -exec nbqa flake8 {} +
find ./book/chapters/ -type f -name '*.ipynb' -exec nbqa flake8 {} + > lint_logs.txt
# Fail the workflow if linting errors are found
continue-on-error: true

- name: Check for Errors
run: |
if [ -n "$(grep -r "^[^:]*: [1-9]" ./*.ipynb)" ]; then
if [ -s lint_logs.txt ]; then
echo "Linting errors found. Please check the logs."
cat lint_logs.txt # Print the logs for debugging purposes
rm lint_logs.txt # Remove the cache file
exit 1
fi

0 comments on commit 1fa26f3

Please sign in to comment.