mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
add script validation testing
This commit is contained in:
parent
632cf44bd3
commit
05dca6a45e
1 changed files with 18 additions and 5 deletions
|
|
@ -1,12 +1,25 @@
|
||||||
|
variables:
|
||||||
|
GIT_SSL_NO_VERIFY: "true"
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null
|
||||||
|
- Install-Module InvokeBuild, BuildHelpers, PSScriptAnalyzer -force -Scope CurrentUser
|
||||||
|
- Install-Module Pester -Force -SkipPublisherCheck -Scope CurrentUser
|
||||||
|
- Import-Module PSScriptAnalyzer
|
||||||
|
- Import-Module Pester
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
# - release
|
# - release
|
||||||
variables:
|
|
||||||
GIT_SSL_NO_VERIFY: "true"
|
ps_scriptanalyzer:
|
||||||
Test:
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- powershell -Command "./build.ps1" "-Task Pester"
|
- $res = (Invoke-ScriptAnalyzer -Path . -Severity Error).count
|
||||||
|
- if ($res -gt 0) { throw "$($res) Analytics failed."}
|
||||||
|
tags:
|
||||||
|
- powershell
|
||||||
|
|
||||||
# except:
|
# except:
|
||||||
# - master
|
# - master
|
||||||
#Release:
|
#Release:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue