@@ -202,6 +202,9 @@ jobs:
202202
203203 packaging :
204204 runs-on : ubuntu-latest
205+ env :
206+ QUICKTEST : True
207+ shell : bash
205208 steps :
206209 - uses : actions/checkout@v2
207210 with :
@@ -229,51 +232,57 @@ jobs:
229232 # however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
230233 # fresh torch installation according to pyproject.toml
231234 python -m pip install torch>=1.5 torchvision
232- - name : Test source archive and wheel file
235+ - name : Check packages
233236 run : |
234237 pip uninstall monai
235238 pip list | grep -iv monai
236239 git fetch --depth=1 origin +refs/tags/*:refs/tags/*
237- root_dir=$PWD
238- echo "$root_dir"
239240 set -e
240241
241242 # build tar.gz and wheel
242243 python setup.py check -m -s
243244 python setup.py sdist bdist_wheel
244245 python -m twine check dist/*
245-
246+ - run : echo "::set-output name=pwd::$PWD"
247+ id : root
248+ - run : echo "::set-output name=tmp_dir::$(mktemp -d)"
249+ id : mktemp
250+ - name : Move packages
251+ run : |
252+ printf ${{ steps.root.outputs.pwd }}
253+ printf ${{ steps.mktemp.outputs.tmp_dir }}
246254 # move packages to a temp dir
247- tmp_dir=$(mktemp -d)
248- cp dist/monai* "$tmp_dir"
255+ cp dist/monai* "${{ steps.mktemp.outputs.tmp_dir }}"
249256 rm -r build dist monai.egg-info
250- cd "$tmp_dir"
257+ cd "${{ steps.mktemp.outputs. tmp_dir }} "
251258 ls -al
252-
259+ - name : Install wheel file
260+ working-directory : ${{ steps.mktemp.outputs.tmp_dir }}
261+ run : |
253262 # install from wheel
254263 python -m pip install monai*.whl
255264 python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
256265 python -c 'import monai; print(monai.__file__)'
257266 python -m pip uninstall -y monai
258267 rm monai*.whl
259-
268+ - name : Install source archive
269+ working-directory : ${{ steps.mktemp.outputs.tmp_dir }}
270+ run : |
260271 # install from tar.gz
261272 name=$(ls *.tar.gz | head -n1)
262273 echo $name
263274 python -m pip install $name[all]
264275 python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
265276 python -c 'import monai; print(monai.__file__)'
266-
277+ - name : Quick test
278+ working-directory : ${{ steps.mktemp.outputs.tmp_dir }}
279+ run : |
267280 # run min tests
268- cp $root_dir/requirements*.txt "$tmp_dir"
269- cp -r $root_dir/tests "$tmp_dir"
270- pwd
281+ cp ${{ steps.root.outputs.pwd }}/requirements*.txt .
282+ cp -r ${{ steps.root.outputs.pwd }}/tests .
271283 ls -al
272284 python -m pip install -r requirements-dev.txt
273285 python -m unittest -v
274- env :
275- QUICKTEST : True
276- shell : bash
277286
278287 build-docs :
279288 runs-on : ubuntu-latest
0 commit comments