v2.0.0 #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Installation Script | |
on: | |
push: | |
paths: | |
- 'install.ps1' | |
- '.github/workflows/test-install.yml' | |
pull_request: | |
paths: | |
- 'install.ps1' | |
- '.github/workflows/test-install.yml' | |
release: | |
jobs: | |
test-install: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run installation script | |
run: | | |
.\\install.ps1 | |
shell: powershell | |
- name: Verify installation | |
run: | | |
# Check if envfetch directory exists | |
$envfetchPath = "$env:APPDATA\envfetch" | |
if (-not (Test-Path $envfetchPath)) { | |
throw "envfetch directory not found" | |
} | |
# Check if executable exists | |
if (-not (Test-Path "$envfetchPath\envfetch.exe")) { | |
throw "envfetch.exe not found" | |
} | |
# Verify PATH | |
$userPath = [Environment]::GetEnvironmentVariable("Path", "User") | |
if ($userPath -notlike "*$envfetchPath*") { | |
throw "envfetch not found in PATH" | |
} | |
# Try to run envfetch (this should at least not crash) | |
$env:Path = [Environment]::GetEnvironmentVariable("Path", "User") | |
$result = envfetch --version | |
if ($LASTEXITCODE -ne 0) { | |
throw "envfetch failed to run" | |
} | |
shell: powershell | |
- name: Cleanup | |
run: | | |
Remove-Item -Path "$env:APPDATA\envfetch" -Recurse -Force -ErrorAction SilentlyContinue | |
shell: powershell |