-
Notifications
You must be signed in to change notification settings - Fork 784
56 lines (51 loc) · 1.87 KB
/
test-modified.yml
File metadata and controls
56 lines (51 loc) · 1.87 KB
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
49
50
51
52
53
54
55
56
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@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
cache: 'pip'
- name: Install MONAI
id: monai-install
env:
PIP_NO_CACHE_DIR: "1"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
run: |
find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
df -h
which python
python -m pip install -U pip wheel wheel-stub
# Force CPU-only PyTorch wheels so we don't download huge CUDA/nvidia-* wheels in CI.
# Keep PyPI available for torch's dependencies.
pip install --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple torch torchvision torchaudio
pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt
pip install -r requirements.txt
# Avoid PEP517 build isolation (which can re-install torch and pull CUDA wheels).
BUILD_MONAI=0 pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI#egg=MONAI
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