diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 65932e0..6eb0993 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ inputs.version && fromJSON(format('["{0}"]', inputs.version)) || fromJSON('["release", "pre-release"]') }} + version: ${{ inputs.version && fromJSON(format('["{0}"]', inputs.version)) || fromJSON('["release", "pre-release", "1.8.25"]') }} config: # Default config for standard platforms - os: macos-latest diff --git a/setup/action.yml b/setup/action.yml index c66e9dd..2aa7314 100644 --- a/setup/action.yml +++ b/setup/action.yml @@ -77,7 +77,7 @@ runs: run: | # Install quarto [ ${{ runner.os }} != "Windows" ] && installer=${{ steps.download-quarto.outputs.installer }} - case $RUNNER_OS in + case $RUNNER_OS in "Linux") sudo apt -y install ./$installer ;; @@ -98,10 +98,20 @@ runs: exit 1 ;; esac - [ ${{ runner.os }} != "Windows" ] && rm $installer - echo "Quarto Installed !" + if [ "${{ runner.os }}" != "Windows" ]; then + rm $installer + fi shell: bash working-directory: ${{ runner.temp }} + - name: 'Verify Quarto installation' + run: | + if ! command -v quarto &> /dev/null; then + echo "ERROR: Quarto installation completed but quarto command not found" + exit 1 + fi + echo "Quarto Installed !" + quarto --version + shell: bash - name: 'Install TinyTeX' env: QUARTO_PRINT_STACK: true diff --git a/setup/install-quarto-windows.ps1 b/setup/install-quarto-windows.ps1 index 9765616..6f7c524 100644 --- a/setup/install-quarto-windows.ps1 +++ b/setup/install-quarto-windows.ps1 @@ -14,16 +14,30 @@ ttps:/go.microsoft.com/fwlink/?LinkID=135170 #> -Invoke-WebRequest -useb get.scoop.sh -outfile 'install.ps1' -.\install.ps1 -RunAsAdmin -Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH +# Exit immediately on errors +$ErrorActionPreference = "Stop" + +try { + Invoke-WebRequest -useb get.scoop.sh -outfile 'install.ps1' + .\install.ps1 -RunAsAdmin + if ($LASTEXITCODE -ne 0) { + Write-Error "Scoop installation failed with exit code $LASTEXITCODE" + exit 1 + } + $scoopShims = Join-Path (Resolve-Path ~).Path "scoop\shims" + Add-Content -Path $Env:GITHUB_PATH -Value $scoopShims +} catch { + Write-Error "Failed to download or install Scoop: $_" + exit 1 +} $version=$args[0] scoop bucket add r-bucket https://github.com/cderv/r-bucket.git + if ([string]::IsNullOrEmpty($version)) { scoop install quarto } elseif ($version -eq 'pre-release') { - Invoke-Expression -Command "scoop install quarto-prerelease" + scoop install quarto-prerelease } else { - Invoke-Expression -Command "scoop install quarto@$version" + scoop install quarto@$version }