Skip to content

Commit

Permalink
Test compiling docs in CI (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosavola authored Mar 23, 2022
1 parent 3030b31 commit e13dae4
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
# Increment this to invalidate the cache without modifying requirements.txt
PIPCACHEVERSION: 0
PYTHONVERSION: '3.9.x' # qutip does not support 3.10 yet

jobs:
pylint:
Expand All @@ -20,8 +21,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v2
with:
# qutip does not support 3.10 yet
python-version: '3.9.x'
python-version: ${{ env.PYTHONVERSION }}
- name: Set up cache
id: cache
uses: actions/cache@v2
Expand All @@ -35,3 +35,36 @@ jobs:
run: python -m pip install . pylint
- name: Run pylint
run: pylint --errors-only --jobs=0 pyEPR

test_docs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Set up Python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHONVERSION }}
- name: Set up cache
id: cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ env.PIPCACHEVERSION }}
restore-keys: |
${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-
${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
- name: Install package and sphinx
run: python -m pip install . Sphinx
- name: Make docs
run: |
cd docs
make html
- name: Upload docs to artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: docs
path: docs/build/html/
retention-days: 5

0 comments on commit e13dae4

Please sign in to comment.