Update reproducibility-checker.yml #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Reproducibility Checker | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
check-reproducibility-of-all-notebooks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- uses: ./.github/actions/setupconda | |
- name: Install Dependencies | |
run: | | |
pip install nbqa flake8 | |
- name: Lint Jupyter Notebooks | |
run: | | |
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 [ -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 |