Add pre-commit hook to stop linting errors being pushed. #5150
Workflow file for this run
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: Docs | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
env: | |
ALLOW_LATEST_GPYTORCH_LINOP: true | |
run: | | |
pip install git+https://github.com/cornellius-gp/linear_operator.git | |
pip install git+https://github.com/cornellius-gp/gpytorch.git | |
pip install .[dev] | |
pip install beautifulsoup4 ipython nbconvert jinja2 | |
- name: Validate Sphinx | |
run: | | |
python scripts/validate_sphinx.py -p "$(pwd)" | |
- name: Run sphinx | |
run: | | |
# warnings treated as errors | |
sphinx-build -WT --keep-going sphinx/source sphinx/build | |
- name: Validate and parse tutorials | |
run: | | |
python scripts/parse_tutorials.py -w "$(pwd)" |