Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test compiling docs in CI #104

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

- name: Set up cache
id: cache
uses: actions/cache@v2
Expand All @@ -35,3 +35,36 @@ jobs:
run: python -m pip install . pylint
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did pylint run ok?

- 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