Skip to content

Commit

Permalink
CI: verify docs up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed May 22, 2024
1 parent 9802e21 commit 9a13561
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,38 @@ jobs:
matrix:
toxenv: [lint, docs-lint, pycodestyle]
python-version: [ "3.10" ]
include:
# for actions that want git env, not tox env
toxenv: null
python-version: "3.10"
steps:
- uses: actions/checkout@v4
- name: Using Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Dependencies
- name: Install Dependencies (tox)
if: ${{ matrix.toxenv }}
run: |
python -m pip install --upgrade pip
python -m pip install tox
- run: tox -e ${{ matrix.toxenv }}
if: ${{ matrix.toxenv }}
- name: Install Dependencies (non-toxic)
if: ${{ ! matrix.toxenv }}
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: "Update docs"
if: ${{ ! matrix.toxenv }}
run: |
# this will update docs/source/settings.rst - but will not create html output
(cd docs && sphinx-build -b "dummy" -d _build/doctrees source "_build/dummy")
if unclean=$(git status --untracked-files=no --porcelain) && [ -z "$unclean" ]; then
echo "no uncommitted changes in working tree (as it should be)"
else
echo "did you forget to run `make -C docs html`?"
echo "$unclean"
exit 2
fi

0 comments on commit 9a13561

Please sign in to comment.