-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update plantuml, use poetry install for docs
Add plantuml dependency for RTD
- Loading branch information
Showing
4 changed files
with
42 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,33 +29,38 @@ jobs: | |
with: | ||
python-version: 3.8 # should match value in .readthedocs.yml | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.4.2 | ||
|
||
- name: Configure poetry | ||
shell: bash | ||
run: python -m poetry config virtualenvs.in-project true | ||
|
||
- name: Set up cache | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: .venv | ||
key: venv-pip-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '.github/workflows/docs.yml')}} | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
shell: bash | ||
run: source .venv/bin/activate && | ||
(timeout 10s pip --version || (rm -rf .venv && echo "::set-output name=cache-bad::true")) | ||
id: cache-checkup | ||
run: timeout 10s python -m poetry run pip --version || rm -rf .venv | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m poetry install | ||
- name: Install plantuml | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y plantuml | ||
- name: Install dependencies | ||
shell: bash | ||
run: python -m venv .venv && | ||
source .venv/bin/activate && | ||
pip install .[docs] | ||
if: ${{ steps.cache-venv.ouputs.cache-hit != 'true' || steps.cache-checkup.outputs.cache-bad == 'true'}} | ||
|
||
- name: Test docs build successfully | ||
run: source .venv/bin/activate && | ||
make -C doc html SPHINXOPTS="-W --keep-going" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
# .readthedocs.yml | ||
|
||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
apt_packages: | ||
- plantuml | ||
tools: | ||
python: "3.8" | ||
jobs: | ||
post_create_environment: | ||
# Install poetry | ||
# https://python-poetry.org/docs/#installing-manually | ||
- pip install poetry | ||
# Tell poetry to not use a virtual environment | ||
- poetry config virtualenvs.create false | ||
post_install: | ||
# Install dependencies with 'docs' dependency group | ||
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups | ||
- poetry install --with docs --without dev | ||
|
||
sphinx: | ||
configuration: doc/conf.py | ||
fail_on_warning: true | ||
|
||
python: | ||
version: 3.8 | ||
install: | ||
- path: . | ||
method: pip | ||
extra_requirements: | ||
- docs | ||
system_packages: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters