Merge pull request #3583 from GreatRSingh/SeqToSeq-Model #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |