Skip to content

Commit

Permalink
Test docs also in GHA.
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Dec 3, 2024
1 parent b07f20c commit 1262f67
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docs

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allows running this workflow manually from the Actions tab
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
tests:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
docs-v1-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
docs-v1-
- name: Install dependencies
run: |
python -m pip install -U pip tox
- name: Docs
run: |
tox -e docs
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
~/.cache/pip
~/.cache/pre-commit
key:
lint-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
lint-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-v1-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.pytest-version }}-v1-${{ hashFiles('**/setup.py') }}
${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.pytest-version }}-v1-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.pytest-version }}-v1-
Expand Down

0 comments on commit 1262f67

Please sign in to comment.