Skip to content

Commit

Permalink
Check for Sphinx doc warnings in a new, separate GitHub actions workf…
Browse files Browse the repository at this point in the history
…low file `check-docs.yml`
  • Loading branch information
tomwhite committed Feb 5, 2024
1 parent c5af016 commit ab4b956
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 18 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand All @@ -24,26 +24,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install graphviz # Needed for documentation
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt
pip install -r requirements.txt -r requirements-dev.txt
- name: Run pre-commit
uses: pre-commit/[email protected]
- name: Check for Sphinx doc warnings
run: |
cd docs
make html SPHINXOPTS="-W --keep-going -n"
- uses: actions/upload-artifact@v2
if: failure()
with:
name: gwas_tutorial
path: /home/runner/work/sgkit/sgkit/docs/_build/html/reports/examples/gwas_tutorial.err.log
- uses: actions/upload-artifact@v2
if: failure()
with:
name: relatedness_tutorial
path: /home/runner/work/sgkit/sgkit/docs/_build/html/reports/examples/relatedness_tutorial.err.log
- name: Test with pytest
run: |
pytest -v
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Check docs

on:
push:
pull_request:
schedule:
# Run at the end of every day
- cron: "0 0 * * *"

jobs:
build:
# Scheduled runs only on the origin org
if: (github.event_name == 'schedule' && github.repository_owner == 'pystatgen') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install graphviz # Needed for documentation
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt
- name: Run pre-commit
uses: pre-commit/[email protected]
- name: Check for Sphinx doc warnings
run: |
cd docs
make html SPHINXOPTS="-W --keep-going -n"
- uses: actions/upload-artifact@v2
if: failure()
with:
name: gwas_tutorial
path: /home/runner/work/sgkit/sgkit/docs/_build/html/reports/examples/gwas_tutorial.err.log
- uses: actions/upload-artifact@v2
if: failure()
with:
name: relatedness_tutorial
path: /home/runner/work/sgkit/sgkit/docs/_build/html/reports/examples/relatedness_tutorial.err.log

0 comments on commit ab4b956

Please sign in to comment.