Update reproducibility-checker.yml #11
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 {} + | |
# 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 | |
echo "Linting errors found. Please check the logs." | |
exit 1 | |
fi |