Refactoring min-dep tests #20
Workflow file for this run
This file contains hidden or 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: build_docs | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| - releasing/* | |
| pull_request: | |
| branches: | |
| - dev | |
| - main | |
| - releasing/* | |
| concurrency: | |
| # automatically cancel the previously triggered workflows when there's a newer version | |
| group: build-docs-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| env: | |
| # minimum supported version of Python | |
| PYTHON_VER1: '3.10' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ env.PYTHON_VER1 }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VER1 }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| python -m pip install -r docs/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | |
| - name: Make html | |
| run: | | |
| cd docs/ | |
| make clean | |
| make html 2>&1 | tee tmp_log | |
| if [[ $(grep -c "ERROR:" tmp_log) != 0 ]]; then echo "Found errors"; grep "ERROR:" tmp_log; exit 1; fi | |
| sed '/WARNING.*pip/d' tmp_log > tmp_log1; mv tmp_log1 tmp_log # monai#7133 | |
| if [[ $(grep -c "WARNING:" tmp_log) != 0 ]]; then echo "Found warnings"; grep "WARNING:" tmp_log; exit 1; fi | |
| shell: bash |