-
-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (55 loc) · 1.93 KB
/
Copy pathvalidate.yml
File metadata and controls
64 lines (55 loc) · 1.93 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
name: validate
on: [pull_request]
jobs:
general-unit-tests:
name: Validate General Unit Tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v5
with:
path: ~\Documents\PowerShell\Modules
key: ps-modules-${{ runner.os }}-v1
- name: Install Prerequisites
if: steps.cache-powershell-modules.outputs.cache-hit != 'true'
shell: pwsh
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
$modules = @('Pester','PSFramework','PSModuleDevelopment','PSScriptAnalyzer','psake')
foreach ($module in $modules) {
Write-Host "Installing $module..."
Install-Module -Name $module -Scope CurrentUser -Force -SkipPublisherCheck
}
- name: Validate
shell: pwsh
run: build\vsts-validate.ps1 -TestGeneral $true -TestFunctions $false
individual-unit-tests:
name: Validate Individual Unit Tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache Powershell Modules
id: cache-powershell-modules
uses: actions/cache@v5
with:
path: ~\Documents\PowerShell\Modules
key: ps-modules-${{ runner.os }}-v1
- name: Install Prerequisites
if: steps.cache-powershell-modules.outputs.cache-hit != 'true'
shell: pwsh
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
$modules = @('Pester','PSFramework','PSModuleDevelopment','PSScriptAnalyzer','psake')
foreach ($module in $modules) {
Write-Host "Installing $module..."
Install-Module -Name $module -Scope CurrentUser -Force -SkipPublisherCheck
}
- name: Validate
shell: pwsh
run: build\vsts-validate.ps1 -TestGeneral $false -TestFunctions $true