Skip to content

Commit dad8cc7

Browse files
committed
tmpdir
Signed-off-by: Jirka <[email protected]>
1 parent f226779 commit dad8cc7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/pythonapp.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,25 +237,27 @@ jobs:
237237
pip uninstall monai
238238
pip list | grep -iv monai
239239
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
240-
root_dir=$PWD
241-
echo "$root_dir"
242240
set -e
243241
244242
# build tar.gz and wheel
245243
python setup.py check -m -s
246244
python setup.py sdist bdist_wheel
247245
python -m twine check dist/*
248-
- name: Make Temp dir
249-
run: echo "::set-output name=tmp_dir::$(mktemp -d)"
246+
- run: echo "::set-output name=pwd::$PWD"
247+
id: root
248+
- run: echo "::set-output name=tmp_dir::$(mktemp -d)"
250249
id: mktemp
251250
- name: Move packages
252251
run: |
252+
printf ${{ steps.root.outputs.pwd }}
253+
printf ${{ steps.mktemp.outputs.tmp_dir }}
253254
# move packages to a temp dir
254255
cp dist/monai* "${{ steps.mktemp.outputs.tmp_dir }}"
255256
rm -r build dist monai.egg-info
256257
cd "${{ steps.mktemp.outputs.tmp_dir }}"
257258
ls -al
258259
- name: Install wheel file
260+
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
259261
run: |
260262
# install from wheel
261263
python -m pip install monai*.whl
@@ -264,6 +266,7 @@ jobs:
264266
python -m pip uninstall -y monai
265267
rm monai*.whl
266268
- name: Install source archive
269+
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
267270
run: |
268271
# install from tar.gz
269272
name=$(ls *.tar.gz | head -n1)
@@ -272,11 +275,11 @@ jobs:
272275
python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
273276
python -c 'import monai; print(monai.__file__)'
274277
- name: Quick test
278+
working-directory: ${{ steps.mktemp.outputs.tmp_dir }}
275279
run: |
276280
# run min tests
277-
cp $root_dir/requirements*.txt "${{ steps.mktemp.outputs.tmp_dir }}"
278-
cp -r $root_dir/tests "${{ steps.mktemp.outputs.tmp_dir }}"
279-
pwd
281+
cp ${{ steps.root.outputs.pwd }}/requirements*.txt .
282+
cp -r ${{ steps.root.outputs.pwd }}/tests .
280283
ls -al
281284
python -m pip install -r requirements-dev.txt
282285
python -m unittest -v

0 commit comments

Comments
 (0)