File tree 1 file changed +13
-1
lines changed
tests/integration/workflows/java_gradle 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import shutil
3
3
import tempfile
4
+ import platform
4
5
5
6
from unittest import TestCase
6
7
from pathlib import Path
@@ -36,7 +37,18 @@ class TestJavaGradle(TestCase):
36
37
37
38
def setUp (self ):
38
39
self .artifacts_dir = tempfile .mkdtemp ()
39
- self .scratch_dir = tempfile .mkdtemp ()
40
+
41
+ scratch_folder_override = None
42
+ if platform .system ().lower () == "windows" and os .getenv ("GITHUB_ACTIONS" ):
43
+ # lucashuy: there is some really odd behaviour where
44
+ # gradle will refuse to work it is run within
45
+ # the default TEMP folder location in Github Actions
46
+ #
47
+ # use the runner's home directory as a workaround
48
+ scratch_folder_override = os .getenv ("userprofile" )
49
+
50
+ self .scratch_dir = tempfile .mkdtemp (dir = scratch_folder_override )
51
+
40
52
self .dependencies_dir = tempfile .mkdtemp ()
41
53
self .builder = LambdaBuilder (language = "java" , dependency_manager = "gradle" , application_framework = None )
42
54
You can’t perform that action at this time.
0 commit comments