[pre-commit.ci] pre-commit suggestions #2960
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: premerge-notebooks | |
on: | |
# quick tests of modified notebooks for every pull request | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
# automatically cancel the previously triggered workflows when there's a newer version | |
group: build-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install MONAI | |
id: monai-install | |
run: | | |
which python | |
python -m pip install -U pip wheel | |
python -m pip install torch torchvision torchaudio | |
python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt | |
python -m pip install -r requirements.txt | |
BUILD_MONAI=0 python -m pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI | |
python -m pip list | |
- name: Notebook quick check | |
shell: bash | |
run: | | |
python -c "import monai; monai.config.print_debug_info()" | |
git fetch origin main | |
git diff --name-only origin/main | while read line | |
do | |
if [[ $line == *.ipynb ]] | |
then | |
./runner.sh -p " -and -wholename './${line}'" | |
fi | |
done |