Skip to content

Merge pull request #373 from jupyter/dependabot/github_actions/action… #751

Merge pull request #373 from jupyter/dependabot/github_actions/action…

Merge pull request #373 from jupyter/dependabot/github_actions/action… #751

Workflow file for this run

name: Docs Tests
on:
push:
branches: '*'
pull_request:
branches: '*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
python-version: '3.11'
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install Python ${{ env.python-version }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ env.python-version }}
architecture: 'x64'
- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip wheel
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT"
- name: Cache pip
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ env.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ env.python-version }}-
${{ runner.os }}-pip-
- name: Install the Python dependencies
run: |
pip install -e .[test] codecov
pip install -r docs/doc-requirements.txt
- name: Install pandoc
uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1.1.1
with:
version: 3.6.4
- name: List installed packages
run: |
pip freeze
pip check
- name: Run tests on documentation
run: |
EXIT_STATUS=0
make -C docs/ html || EXIT_STATUS=$?
cd docs/source && pytest --nbval --current-env .. || EXIT_STATUS=$?
exit $EXIT_STATUS