forked from deepchem/deepchem
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.53 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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