Explorar o código

user runner.temp instead of /tmp/ (#338)

Co-authored-by: Fred Lefévère-Laoide <Fred.Lefevere-Laoide@Taipy.io>
Fred Lefévère-Laoide hai 1 ano
pai
achega
8095ae8895

+ 3 - 3
.github/workflows/packaging.yml

@@ -36,15 +36,15 @@ jobs:
           python -c "import taipy as tp; tp.Scenario"
           python -c "import taipy as tp; tp.gui"
           python -c "import taipy as tp; tp.rest"
-          
+
           echo """
           import taipy
           from pathlib import Path
           taipy_gui_core_path = Path(taipy.__file__).absolute().parent / 'gui_core' / 'lib' / 'taipy-gui-core.js'
           if not taipy_gui_core_path.exists():
               raise FileNotFoundError(f'taipy-gui-core.js not found in {taipy_gui_core_path}')
-          """ > /tmp/verify_gui_core.py
-          python /tmp/verify_gui_core.py
+          """ > ${{ runner.temp }}/verify_gui_core.py
+          python ${{ runner.temp }}/verify_gui_core.py
 
       - name: Notify user if failed
         if: failure()

+ 11 - 11
.github/workflows/release-dev.yml

@@ -38,8 +38,8 @@ jobs:
               version = f'{version}.{vext}'
           if SUFFIX not in version:
               raise ValueError(f\"version {version} does not contain suffix {SUFFIX}\")
-          """ > /tmp/check1.py
-          python /tmp/check1.py
+          """ > ${{ runner.temp }}/check1.py
+          python ${{ runner.temp }}/check1.py
 
       - name: Extract package version
         id: current-version
@@ -52,8 +52,8 @@ jobs:
           if vext := version_o.get(\"ext\"):
               version = f'{version}.{vext}'
           print(f'VERSION={version}')
-          """ > /tmp/check2.py
-          python /tmp/check2.py >> $GITHUB_OUTPUT
+          """ > ${{ runner.temp }}/check2.py
+          python ${{ runner.temp }}/check2.py >> $GITHUB_OUTPUT
 
       - name: Check taipy-gui dependencies
         run: |
@@ -70,7 +70,7 @@ jobs:
         run: |
           curl https://pypi.org/simple/taipy-rest/ | grep -o ">taipy-rest-${{ github.event.inputs.taipy-rest-version }}\.tar\.gz<"
           curl https://pypi.org/simple/taipy-templates/ | grep -o ">taipy-templates-${{ github.event.inputs.taipy-templates-version }}\.tar\.gz<"
-      
+
       - name: Update setup.py locally
         if: github.event.inputs.taipy-gui-version != '' && github.event.inputs.taipy-rest-version != '' && github.event.inputs.taipy-templates-version != ''
         run: |
@@ -101,8 +101,8 @@ jobs:
                                   end = line.rstrip().find(',')
                                   line = f'{line[:start]}\"taipy-templates=={sys.argv[3]}\"{line[end:]}'
                   setup_w.write(line)
-          """ > /tmp/write_setup_taipy.py
-          python /tmp/write_setup_taipy.py "${{ github.event.inputs.taipy-gui-version }}" "${{ github.event.inputs.taipy-rest-version }}" "${{ github.event.inputs.taipy-templates-version }}"
+          """ > ${{ runner.temp }}/write_setup_taipy.py
+          python ${{ runner.temp }}/write_setup_taipy.py "${{ github.event.inputs.taipy-gui-version }}" "${{ github.event.inputs.taipy-rest-version }}" "${{ github.event.inputs.taipy-templates-version }}"
 
       - name: Build package
         run: python setup.py build_py && python -m build
@@ -124,8 +124,8 @@ jobs:
           taipy_gui_core_path = Path(taipy.__file__).absolute().parent / 'gui_core' / 'lib' / 'taipy-gui-core.js'
           if not taipy_gui_core_path.exists():
               raise FileNotFoundError(f'taipy-gui-core.js not found in {taipy_gui_core_path}')
-          """ > /tmp/verify_gui_core.py
-          python /tmp/verify_gui_core.py
+          """ > ${{ runner.temp }}/verify_gui_core.py
+          python ${{ runner.temp }}/verify_gui_core.py
 
       - name: Extract commit hash
         shell: bash
@@ -165,8 +165,8 @@ jobs:
               if vext := version_o.get(\"ext\"):
                   version = f'{version}.{vext}'
               print(f'VERSION={version}')
-          """ > /tmp/increase_dev_version.py
-          python /tmp/increase_dev_version.py >> $GITHUB_OUTPUT
+          """ > ${{ runner.temp }}/increase_dev_version.py
+          python ${{ runner.temp }}/increase_dev_version.py >> $GITHUB_OUTPUT
 
       - uses: stefanzweifel/git-auto-commit-action@v4
         with:

+ 10 - 10
.github/workflows/release.yml

@@ -33,8 +33,8 @@ jobs:
               version = f'{version}.{vext}'
           if version != sys.argv[1]:
               raise ValueError(f\"Invalid version {version} / {sys.argv[1]}\")
-          """ > /tmp/check1.py
-          python /tmp/check1.py "${{ github.event.inputs.version }}"
+          """ > ${{ runner.temp }}/check1.py
+          python ${{ runner.temp }}/check1.py "${{ github.event.inputs.version }}"
 
       - name: Validate branch name
         run: |
@@ -44,13 +44,13 @@ jobs:
               version = json.load(version_file)
           if f'release/{version.get(\"major\")}.{version.get(\"minor\")}' != sys.argv[1]:
               raise ValueError(f'Branch name mismatch: release/{version.get(\"major\")}.{version.get(\"minor\")} != {sys.argv[1]}')
-          """ > /tmp/check2.py
-          python /tmp/check2.py "${{ steps.extract_branch.outputs.branch }}"
-      
+          """ > ${{ runner.temp }}/check2.py
+          python ${{ runner.temp }}/check2.py "${{ steps.extract_branch.outputs.branch }}"
+
       - name: Modify README image file path
         run: |
           cp tools/modify_readme.py /tmp
-          python /tmp/modify_readme.py "${{ github.event.repository.name }}" "${{ steps.extract_branch.outputs.branch }}"
+          python ${{ runner.temp }}/modify_readme.py "${{ github.event.repository.name }}" "${{ steps.extract_branch.outputs.branch }}"
 
       - name: Get taipy-gui version from setup.py
         id: taipy_gui_version
@@ -63,8 +63,8 @@ jobs:
                       end = line.rstrip().find('\",')
                       print(f'VERSION={line[start:end]}')
                       break
-          """ > /tmp/get_gui_version.py
-          python /tmp/get_gui_version.py >> $GITHUB_OUTPUT
+          """ > ${{ runner.temp }}/get_gui_version.py
+          python ${{ runner.temp }}/get_gui_version.py >> $GITHUB_OUTPUT
 
       - name: Install dependencies
         run: |
@@ -87,8 +87,8 @@ jobs:
           taipy_gui_core_path = Path(taipy.__file__).absolute().parent / 'gui_core' / 'lib' / 'taipy-gui-core.js'
           if not taipy_gui_core_path.exists():
               raise FileNotFoundError(f'taipy-gui-core.js not found in {taipy_gui_core_path}')
-          """ > /tmp/verify_gui_core.py
-          python /tmp/verify_gui_core.py
+          """ > ${{ runner.temp }}/verify_gui_core.py
+          python ${{ runner.temp }}/verify_gui_core.py
 
       - name: Extract commit hash
         shell: bash