Skip to content

Merge pull request #3653 from NimishaDey/meta_torch #65

Merge pull request #3653 from NimishaDey/meta_torch

Merge pull request #3653 from NimishaDey/meta_torch #65

Workflow file for this run

name: Test for documents
on:
push: # ci work when pushing master branch
branches:
- master
pull_request: # ci work when creating a PR to master branch
branches:
- master
jobs:
docs-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v3
- name: Cache pip packages for Linux
uses: actions/cache@v3
# use cached dependencies to speed up workflow
# ref: https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows
with:
path: ~/.cache/pip
# the key is used to search for cache
# hashFile(paths) return a single hash for the set of files that matches the path pattern
key: ${{ runner.os }}-pip-${{ hashFiles('**/**/docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (docs)
shell: bash -l {0}
working-directory: ./docs
run: pip install -r requirements.txt
- name: Build docs
shell: bash -l {0}
working-directory: ./docs
run: make clean html
- name: DocTest (Tutorials)
shell: bash -l {0}
working-directory: ./docs
run: make doctest_tutorials
- name: DocTest (Examples)
shell: bash -l {0}
working-directory: ./docs
run: make doctest_examples