Skip to content

Commit 546228e

Browse files
author
avandras
committed
Use RUNNER_TEMP as temp dir
1 parent c4726b3 commit 546228e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/run_tests.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
import shutil
33
import subprocess
44
import sys
5-
import tempfile
65

76

87
def main():
98
what = os.environ.get('DCS', sys.argv[1] if len(sys.argv) > 1 else 'all')
9+
tmp = os.environ.get('RUNNER_TEMP')
1010

1111
if what == 'all':
1212
flake8 = subprocess.call([sys.executable, 'setup.py', 'flake8'])
1313
test = subprocess.call([sys.executable, 'setup.py', 'test'])
1414
version = '.'.join(map(str, sys.version_info[:2]))
15-
shutil.move('.coverage', os.path.join(tempfile.gettempdir(), '.coverage.' + version))
15+
shutil.move('.coverage', os.path.join(tmp, '.coverage.' + version))
1616
return flake8 | test
1717
elif what == 'combine':
18-
tmp = tempfile.gettempdir()
1918
for name in os.listdir(tmp):
2019
if name.startswith('.coverage.'):
2120
shutil.move(os.path.join(tmp, name), name)

0 commit comments

Comments
 (0)