From d55a2b6a1d2c27e341cf8f2ab235c077e0027889 Mon Sep 17 00:00:00 2001 From: Antonio Ettorre Date: Mon, 7 Oct 2024 13:56:23 +0200 Subject: [PATCH] use new command on windows test: 'oq.exe' engine --upgrade-db --- .github/workflows/test_win64.yaml | 98 +++++++++++++++---------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test_win64.yaml b/.github/workflows/test_win64.yaml index 300aaccb2..d2a830b3b 100644 --- a/.github/workflows/test_win64.yaml +++ b/.github/workflows/test_win64.yaml @@ -14,52 +14,52 @@ jobs: strategy: matrix: os: [windows-2022, windows-2019] - steps: - - uses: actions/checkout@v4 - - name: Installation of GMT from standalone - run: | - Invoke-WebRequest -Uri "https://github.com/GenericMappingTools/gmt/releases/download/6.4.0/gmt-6.4.0-win64.exe" -OutFile $HOME\gmt.exe - cd $HOME - $Install = Get-ChildItem -Filter gmt*.exe - Start-Process -FilePath $Install.Fullname -ArgumentList "/S" -Wait - $Env:PATH += ";C:\programs\gmt6\bin" - Write-Host ${env:PATH} - - name: Run scripts to install on windows - run: | - Write-Host "Set LIBRARY PATH for GMT" - $Env:GMT_LIBRARY_PATH="C:\programs\gmt6\bin" - Write-Host "Git branch for Run action "${Env:GIT_BRANCH} - # - $curDir = Get-Location - Write-Host "Current Working Directory: $curDir" - Get-ChildItem -Path .\windows –recurse - Write-Host "Install oqmbtk on branch ${{ github.ref_name }}" - .\windows\install_oqmbtk.ps1 -mbtk_branch ${{ github.ref_name }} - $MYPATH = $HOME + "\mbtk" - Write-Host "Print USERPROFILE folder: $env:USERPROFILE" - Write-Host "Print MYPATH folder: $MYPATH" - $Env:PATH += ";$MYPATH" - $Env:PATH += ";$MYPATH\python3\Scripts" - $Env:PYTHONUTF8=1 - #Added to disable TCL - $Env:MPLBACKEND="AGG" - $Env:PY_PIP=$MYPATH += '\Scripts' - $Env:PY_PIP=$MYPATH += '\python3\Scripts' - $Env:PY_HOME=$MYPATH - $Env:PY_LIBS="$MYPATH\python3\Lib;$MYPATH\python3\Lib\site-package" - Write-Host "MYPATH Directory: $MYPATH" - Start-Job -ScriptBlock{& 'oq.exe' dbserver upgrade} - oq.exe --version - Write-Host "Print all environments variables to check" - dir env: - Write-Host "Print all pypip packages" - pip list - $MBTK = $HOME + "\mbtk" - Write-Host "MBTK Directory: $MBTK" - Set-Location -Path $MBTK - $curDir = Get-Location - Write-Host "Current Working Directory: $curDir" - cd oq-mbtk\openquake - Write-Host "Install pytest and run tests" - pip install pytest==8.1.2 - pytest -vs --color=yes --durations=10 cat ghm man mbt sub wkf smt + steps: + - uses: actions/checkout@v4 + - name: Installation of GMT from standalone + run: | + Invoke-WebRequest -Uri "https://github.com/GenericMappingTools/gmt/releases/download/6.4.0/gmt-6.4.0-win64.exe" -OutFile $HOME\gmt.exe + cd $HOME + $Install = Get-ChildItem -Filter gmt*.exe + Start-Process -FilePath $Install.Fullname -ArgumentList "/S" -Wait + $Env:PATH += ";C:\programs\gmt6\bin" + Write-Host ${env:PATH} + - name: Run scripts to install on windows + run: | + Write-Host "Set LIBRARY PATH for GMT" + $Env:GMT_LIBRARY_PATH="C:\programs\gmt6\bin" + Write-Host "Git branch for Run action "${Env:GIT_BRANCH} + # + $curDir = Get-Location + Write-Host "Current Working Directory: $curDir" + Get-ChildItem -Path .\windows –recurse + Write-Host "Install oqmbtk on branch ${{ github.ref_name }}" + .\windows\install_oqmbtk.ps1 -mbtk_branch ${{ github.ref_name }} + $MYPATH = $HOME + "\mbtk" + Write-Host "Print USERPROFILE folder: $env:USERPROFILE" + Write-Host "Print MYPATH folder: $MYPATH" + $Env:PATH += ";$MYPATH" + $Env:PATH += ";$MYPATH\python3\Scripts" + $Env:PYTHONUTF8=1 + #Added to disable TCL + $Env:MPLBACKEND="AGG" + $Env:PY_PIP=$MYPATH += '\Scripts' + $Env:PY_PIP=$MYPATH += '\python3\Scripts' + $Env:PY_HOME=$MYPATH + $Env:PY_LIBS="$MYPATH\python3\Lib;$MYPATH\python3\Lib\site-package" + Write-Host "MYPATH Directory: $MYPATH" + Start-Job -ScriptBlock{& 'oq.exe' engine --upgrade-db} + oq.exe --version + Write-Host "Print all environments variables to check" + dir env: + Write-Host "Print all pypip packages" + pip list + $MBTK = $HOME + "\mbtk" + Write-Host "MBTK Directory: $MBTK" + Set-Location -Path $MBTK + $curDir = Get-Location + Write-Host "Current Working Directory: $curDir" + cd oq-mbtk\openquake + Write-Host "Install pytest and run tests" + pip install pytest==8.1.2 + pytest -vs --color=yes --durations=10 cat ghm man mbt sub wkf smt