-
Notifications
You must be signed in to change notification settings - Fork 3
84 lines (73 loc) · 2.77 KB
/
Copy pathenv-matrix.yml
File metadata and controls
84 lines (73 loc) · 2.77 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Environment Compatibility Matrix
on:
push:
branches: ["🌕Nextgen", "📦Current"]
pull_request:
branches: ["🌕Nextgen", "📦Current"]
jobs:
matrix-test:
name: "env: ${{ matrix.os }} | Shell: ${{ matrix.shell }} | Admin: ${{ matrix.admin }} | Locale: ${{ matrix.locale }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022]
shell: [pwsh, powershell]
admin: [true, false]
locale: [
en-US, en-GB, de-DE, fr-FR, es-ES, it-IT, ja-JP, ko-KR, zh-CN, zh-TW,
ru-RU, pt-BR, pt-PT
]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set locale
run: |
Set-WinSystemLocale ${{ matrix.locale }}
shell: powershell
continue-on-error: true
# ==== Additional Checks ====
- name: Check Windows Version
run: |
Write-Host "Windows version:"
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer
shell: powershell
- name: Check PowerShell Version
run: |
Write-Host "PowerShell version:"
$PSVersionTable
shell: powershell
- name: Check Disk Space
run: |
Get-PSDrive -PSProvider FileSystem | Select-Object Name, Used, Free, @{Name="FreeGB";Expression={[math]::Round($_.Free/1GB,2)}}
shell: powershell
- name: Check Network Connectivity
run: |
try {
$response = Invoke-WebRequest -Uri "https://github.com" -UseBasicParsing -TimeoutSec 10
Write-Host "Network connectivity OK. Status code: $($response.StatusCode)"
} catch {
Write-Host "Network connectivity FAILED: $($_.Exception.Message)"
exit 1
}
shell: powershell
- name: Run as admin (if required)
if: ${{ matrix.admin == 'true' }}
run: |
Start-Process -FilePath ${{ matrix.shell }} -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File windowstelemetryblocker.ps1 -DryRun -Modules telemetry' -Verb RunAs -Wait
shell: powershell
continue-on-error: true
- name: Run as non-admin (if required)
if: ${{ matrix.admin == 'false' }}
run: |
${{ matrix.shell }} -NoProfile -ExecutionPolicy Bypass -File windowstelemetryblocker.ps1 -DryRun -Modules telemetry
shell: powershell
continue-on-error: true
- name: Upload logs and report
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.os }}-${{ matrix.shell }}-${{ matrix.admin }}-${{ matrix.locale }}
path: |
telemetry-blocker.log
telemetry-blocker-errors.log
telemetry-blocker-report.md