Skip to content

Commit 06ac3ce

Browse files
committed
Merge pull request #169 from PowerShell/master
Take Appveyour changes to BugFixes
2 parents 616e570 + e76671a commit 06ac3ce

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,19 @@ To confirm installation: run ```Get-ScriptAnalyzerRule``` in the PowerShell cons
3737
Building the Code
3838
=================
3939

40-
Use Visual Studio to build "ScriptAnalyzer.sln". Use ~/PSScriptAnalyzer/ folder to load PSScriptAnalyzer.psd1
40+
Use Visual Studio to build "PSScriptAnalyzer.sln". Use ~/PSScriptAnalyzer/ folder to load PSScriptAnalyzer.psd1
4141

4242
**Note: If there are any build errors, please refer to Requirements section and make sure all dependencies are properly installed**
4343

44+
45+
Build Status
46+
==============
47+
48+
| |Master Branch |
49+
|---------|:------:|:------:|:-------:|:-------:|
50+
|**Debug Version**|[![Build status](https://ci.appveyor.com/api/projects/status/h5mot3vqtvxw5d7l/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/psscriptanalyzer/branch/master) |
51+
52+
4453
Running Tests
4554
=============
4655

@@ -70,6 +79,7 @@ Throughput Graph
7079
[![Throughput Graph](https://graphs.waffle.io/powershell/psscriptanalyzer/throughput.svg)](https://waffle.io/powershell/psscriptanalyzer/metrics)
7180

7281

82+
7383
Contributing to ScriptAnalyzer
7484
==============================
7585

appveyor.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# WS2012R2 image with April WMF5.0
2+
os: unstable
3+
4+
# clone directory
5+
clone_folder: c:\projects\psscriptanalyzer
6+
7+
# Install Pester
8+
install:
9+
- cinst -y pester
10+
11+
# Build PSScriptAnalyzer using msbuild
12+
build: true
13+
14+
# branches to build
15+
branches:
16+
# whitelist
17+
only:
18+
- master
19+
- bugfixes
20+
- development
21+
22+
# Run Pester tests and store the results
23+
test_script:
24+
- SET PATH=c:\Program Files\WindowsPowerShell\Modules\;%PATH%;
25+
- ps: |
26+
copy "C:\projects\psscriptanalyzer\PSScriptAnalyzer" "$Env:ProgramFiles\WindowsPowerShell\Modules\" -Recurse -Force
27+
$engineTestResultsFile = ".\EngineTestResults.xml"
28+
$ruleTestResultsFile = ".\RuleTestResults.xml"
29+
$engineTestResults = Invoke-Pester -Script "C:\projects\psscriptanalyzer\Tests\Engine" -OutputFormat NUnitXml -OutputFile $engineTestResultsFile -PassThru
30+
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $engineTestResultsFile))
31+
if ($engineTestResults.FailedCount -gt 0) {
32+
throw "$($engineTestResults.FailedCount) tests failed."
33+
}
34+
$ruleTestResults = Invoke-Pester -Script "C:\projects\psscriptanalyzer\Tests\Rules" -OutputFormat NUnitXml -OutputFile $ruleTestResultsFile -PassThru
35+
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $ruleTestResultsFile))
36+
if ($ruleTestResults.FailedCount -gt 0) {
37+
throw "$($ruleTestResults.FailedCount) tests failed."
38+
}
39+
40+
# Upload the project along with TestResults as a zip archive
41+
on_finish:
42+
- ps: |
43+
$stagingDirectory = (Resolve-Path ..).Path
44+
$zipFile = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
45+
Add-Type -assemblyname System.IO.Compression.FileSystem
46+
[System.IO.Compression.ZipFile]::CreateFromDirectory($pwd, $zipFile)
47+
@(
48+
# You can add other artifacts here
49+
(ls $zipFile)
50+
) | % { Push-AppveyorArtifact $_.FullName }

0 commit comments

Comments
 (0)