Skip to content

Commit

Permalink
fix: 馃悰 documentation build
Browse files Browse the repository at this point in the history
- add environment in tox and github actions for documentation
  build.
  • Loading branch information
abhiabhi94 committed Feb 20, 2022
1 parent 374b199 commit 294bec7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -29,10 +29,6 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Ensure latest pip
run: |
python -m pip install --upgrade pip wheel
- name: Install dependencies
run: |
python -m pip install tox
Expand All @@ -42,6 +38,30 @@ jobs:
python -m tox --version
python -m tox -e lint
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install tox
- name: Build docs
run: |
python -m tox --version
python -m tox -e docs
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
@@ -0,0 +1 @@
furo
3 changes: 0 additions & 3 deletions pyproject.toml
Expand Up @@ -76,6 +76,3 @@ source = [
[tool.coverage.report]
show_missing = true
skip_covered = true

[upload_sphinx]
upload-dir = "docs/_build/html"
16 changes: 15 additions & 1 deletion tox.ini
Expand Up @@ -5,7 +5,7 @@ envlist =
py38-dj{22, 30, 31, 32, main}
py39-dj{22, 30, 31, 32, main}
py310-dj{main}
lint
lint, docs

[gh-actions]
python =
Expand All @@ -20,6 +20,20 @@ deps =
commands =
flake8 hitcount tests {posargs}

[testenv:docs]
deps =
sphinx
furo
allowlist_externals =
poetry
test
make
changedir =
docs
commands =
python -m pip install -U pip poetry
poetry run make html

[testenv]
deps =
dj22: Django>=2.2,<2.3
Expand Down

0 comments on commit 294bec7

Please sign in to comment.