CI: Put docs job in a separate yml #1
Workflow file for this run
This file contains hidden or 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: Base CI | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install -v ".[test]" | ||
| python -m pip install ruff==0.13.1 | ||
| python -m pip install -r .github/constraints/deps.txt | ||
| - name: lint | ||
| run: | | ||
| ruff check | ||
| - name: lint and build docs | ||
| run: | | ||
| numpydoc lint src/gfdl/model.py src/gfdl/activations.py src/gfdl/weights.py | ||
| cd docs && make html SPHINXOPTS="-W --keep-going" | ||
| - name: test | ||
| run: | | ||
| cd $RUNNER_TEMP | ||
| python -m pytest --pyargs gfdl --cov=gfdl --cov-report=term-missing | ||
| - name: upload docs as artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: docs-html | ||
| path: docs/build/html | ||