Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brian Farnhill
committed
Mar 2, 2017
1 parent
50984a8
commit 6ada802
Showing
7 changed files
with
109 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
"Common Tests - Validate Markdown Files", | ||
"Common Tests - Validate Example Files" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
codecov: | ||
notify: | ||
require_ci_to_pass: no | ||
# dev should be the baseline for reporting | ||
branch: dev | ||
|
||
comment: | ||
layout: "reach, diff" | ||
behavior: default | ||
|
||
coverage: | ||
range: 50..80 | ||
round: down | ||
precision: 0 | ||
|
||
status: | ||
project: | ||
default: | ||
# Set the overall project code coverage requirement to 80% | ||
target: 80 | ||
patch: | ||
default: | ||
# Set the pull request requirement to not regress overall coverage by more than 5% | ||
# and let codecov.io set the goal for the code changed in the patch. | ||
target: auto | ||
threshold: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"default": true, | ||
"MD029": { | ||
"style": "ordered" | ||
}, | ||
"MD034": false, | ||
"no-hard-tabs": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,29 @@ | ||
version: 0.1.0.{build} | ||
version: 1.5.0.{build} | ||
image: WMF 5 | ||
|
||
install: | ||
- appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe | ||
- git clone https://github.com/PowerShell/DscResource.Tests | ||
|
||
- npm --silent install | ||
|
||
- ps: | | ||
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | ||
Install-Module Pester -Force | ||
git clone -q https://github.com/PowerShell/DscResource.Tests "$env:APPVEYOR_BUILD_FOLDER\Modules\OfficeOnlineServerDsc\DscResource.Tests" | ||
Import-Module "$env:APPVEYOR_BUILD_FOLDER\Modules\OfficeOnlineServerDsc\DscResource.Tests\TestHelper.psm1" -force | ||
$moduleName = 'OfficeOnlineServerDsc' | ||
$mainModuleFolder = "Modules\$moduleName" | ||
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1" | ||
Invoke-AppveyorInstallTask | ||
build: off | ||
|
||
test_script: | ||
- ps: | | ||
$testResultsFile = ".\TestsResults.xml" | ||
$testCoverageFiles = @() | ||
Import-Module "$env:APPVEYOR_BUILD_FOLDER\Tests\Unit\OfficeOnlineServerDsc.TestHarness.psm1" | ||
$res = Invoke-OosDscUnitTestSuite -TestResultsFile $testResultsFile -DscTestsPath "$env:APPVEYOR_BUILD_FOLDER\Modules\OfficeOnlineServerDsc\DscResource.Tests" | ||
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) | ||
if ($res.FailedCount -gt 0) { | ||
throw "$($res.FailedCount) tests failed." | ||
} | ||
Invoke-AppveyorTestScriptTask ` | ||
-Type 'Harness' ` | ||
-MainModulePath $mainModuleFolder ` | ||
-CodeCovIo | ||
after_test: | ||
- ps: | | ||
Move-Item "$env:APPVEYOR_BUILD_FOLDER\Modules\OfficeOnlineServerDsc\DscResource.Tests" "$env:APPVEYOR_BUILD_FOLDER\" | ||
Import-Module "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\TestHelper.psm1" -force | ||
$manifest = Join-Path "$env:APPVEYOR_BUILD_FOLDER\modules\OfficeOnlineServerDsc" "OfficeOnlineServerDsc.psd1" | ||
(Get-Content $manifest -Raw).Replace("0.1.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest | ||
Add-Type -assemblyname System.IO.Compression.FileSystem | ||
$zipFileName = "OfficeOnlineServerDsc_$($env:APPVEYOR_BUILD_VERSION).zip" | ||
[System.IO.Compression.ZipFile]::CreateFromDirectory("$env:APPVEYOR_BUILD_FOLDER\modules\OfficeOnlineServerDsc", "$env:APPVEYOR_BUILD_FOLDER\$zipFileName") | ||
New-DscChecksum -Path $env:APPVEYOR_BUILD_FOLDER -Outpath $env:APPVEYOR_BUILD_FOLDER | ||
Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\$zipFileName" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } | ||
Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\$zipFileName.checksum" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } | ||
cd "$env:APPVEYOR_BUILD_FOLDER\modules\OfficeOnlineServerDsc" | ||
New-Nuspec -packageName "OfficeOnlineServerDsc" -version $env:APPVEYOR_BUILD_VERSION -author "Microsoft" -owners "Microsoft" -licenseUrl "https://github.com/PowerShell/DscResources/blob/master/LICENSE" -projectUrl "https://github.com/$($env:APPVEYOR_REPO_NAME)" -packageDescription "OfficeOnlineServerDsc" -tags "DesiredStateConfiguration DSC DSCResourceKit" -destinationPath . | ||
nuget pack ".\OfficeOnlineServerDsc.nuspec" -outputdirectory $env:APPVEYOR_BUILD_FOLDER | ||
$nuGetPackageName = "OfficeOnlineServerDsc." + $env:APPVEYOR_BUILD_VERSION + ".nupkg" | ||
Get-ChildItem "$env:APPVEYOR_BUILD_FOLDER\$nuGetPackageName" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } | ||
Invoke-AppveyorAfterTestTask ` | ||
-Type 'Wiki' ` | ||
-MainModulePath $mainModuleFolder ` | ||
-ResourceModuleName $moduleName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var gulp = require("gulp"); | ||
var concat = require("gulp-concat"); | ||
var through2 = require("through2"); | ||
var markdownlint = require("markdownlint"); | ||
|
||
gulp.task("test-mdsyntax", function task() { | ||
return gulp.src("Modules/SharePointDsc/DSCResources/**/*.md", { "read": false }) | ||
.pipe(through2.obj(function obj(file, enc, next) { | ||
markdownlint( | ||
{ | ||
"files": [ file.path ], | ||
"config": require("./.markdownlint.json") | ||
}, | ||
function callback(err, result) { | ||
var resultString = (result || "").toString(); | ||
if (resultString) { | ||
file.contents = new Buffer(resultString); | ||
} | ||
next(err, file); | ||
}); | ||
})) | ||
.pipe(concat("markdownissues.txt", { newLine: "\r\n" })) | ||
.pipe(gulp.dest(".")); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "officeonlinedsc", | ||
"version": "1.4.0", | ||
"description": "The OfficeOnlineDsc PowerShell module provides DSC resources that can be used to deploy and manage a Office Web Apps 2013 and Office Online Server 2016", | ||
"main": "gulpfile.js", | ||
"dependencies": { | ||
"gulp": "^3.9.1", | ||
"through2": "^2.0.1", | ||
"markdownlint": "^0.2.0" | ||
}, | ||
"devDependencies": { | ||
"gulp-concat": "^2.6.0" | ||
}, | ||
"scripts": { | ||
"test": "powershell -File .vscode\\RunPesterTests.ps1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/PowerShell/OfficeOnlineDsc.git" | ||
}, | ||
"author": "Microsoft Corporation", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/PowerShell/OfficeOnlineDsc/issues" | ||
}, | ||
"homepage": "https://github.com/PowerShell/OfficeOnlineDsc#readme" | ||
} |