Skip to content

Commit

Permalink
Update workflows to test documentation (#453)
Browse files Browse the repository at this point in the history
* run doctests on quick_check

* update documentation workflow to test documentation building on pull requests.
  • Loading branch information
kbonney authored Oct 15, 2024
1 parent 576dc01 commit f818093
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_deploy_pages.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This is a basic workflow to help you get started with Actions

name: docs

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
name: Build the documentation with Sphinx
Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
deploy:
name: Deploy documentation to GitHub Pages
needs: build
if: github.event_name == 'push'
permissions:
contents: read
pages: write # to deploy to Pages
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/quick_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
python -m pip install -e .
- name: Run tests and coverage (unittests plus doctests)
run: |
coverage run --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" -m pytest -m "not time_consuming" --doctest-modules --doctest-glob="*.rst" wntr
coverage run --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" -m pytest -m "not time_consuming" --doctest-modules --doctest-glob="*.rst" wntr
coverage run --source=wntr --omit="*/tests/*","*/sim/network_isolation/network_isolation.py","*/sim/aml/evaluator.py" --append -m pytest --doctest-glob="*.rst" documentation
coverage report --fail-under=70
# coverage run --source=wntr --omit="*/tests/*" --append -m pytest --doctest-glob="*.rst" documentation

0 comments on commit f818093

Please sign in to comment.