added test regs github action to validate regs merges #6
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: Windows Action | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: windows-latest | |
steps: | |
- name: Support longpaths | |
run: git config --system core.longpaths true | |
- shell: powershell | |
run: | | |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` | |
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Create reg-merge-results directory | |
run: New-Item -ItemType Directory -Path reg-merge-results | |
- name: Test reg merge | |
shell: powershell | |
run: | | |
$ErrorActionPreference = "Continue" | |
$regFiles = Get-ChildItem -Path . -Filter *.reg -Recurse | |
foreach ($regFile in $regFiles) { | |
$output = reg import $regFile.FullName 2>&1 | |
if ($output -like "*The operation completed successfully*") { | |
New-Item -ItemType File -Path "reg-merge-results\$($regFile.Name).pass" | |
} else { | |
New-Item -ItemType File -Path "reg-merge-results\$($regFile.Name).fail" | |
} | |
} | |
- name: Upload reg-merge-results artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: reg-merge-results | |
path: reg-merge-results |