-
-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (24 loc) · 1016 Bytes
/
Copy pathci.yml
File metadata and controls
24 lines (24 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: CI
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
validate:
runs-on: windows-2022
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Validate with Windows PowerShell 5.1
shell: powershell
run: |
$ErrorActionPreference = 'Stop'
Install-Module Pester -RequiredVersion '5.7.1' -Repository PSGallery -Scope CurrentUser -Force
Install-Module PSScriptAnalyzer -RequiredVersion '1.25.0' -Repository PSGallery -Scope CurrentUser -Force
Import-Module Pester -RequiredVersion '5.7.1' -Force
Import-Module PSScriptAnalyzer -RequiredVersion '1.25.0' -Force
$ValidationParameters = @{}
if ($env:GITHUB_REF -like 'refs/tags/*') {
$ValidationParameters.Tag = $env:GITHUB_REF.Substring('refs/tags/'.Length)
}
.\build\Invoke-Validation.ps1 @ValidationParameters