-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.52 KB
/
test_regs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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