Refactoring min-dep tests #1
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: | |
| # build docs test for pull requests and the releasing branches | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| - releasing/* | |
| pull_request: | |
| head_ref-ignore: | |
| - dev | |
| concurrency: | |
| # automatically cancel the previously triggered workflows when there's a newer version | |
| group: cicd-tests-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # This test is for building documentation on any relevant push or PR. This ensures that any changes to docs or source | |
| # files is tested for correct doc building, whereas functional tests can be deferred if only docs were modified. | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: cache weekly timestamp | |
| id: pip-cache | |
| run: | | |
| echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT | |
| - name: cache for pip | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.cache/torch | |
| key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| python -m pip install -r docs/requirements.txt | |
| - 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 |