From b7173a2d27c8b6a878be565e41793998113f9399 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 07:43:49 -0700 Subject: [PATCH 1/7] Use yarn to install globally --- test/common/markdown/markdown.tests.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/common/markdown/markdown.tests.ps1 b/test/common/markdown/markdown.tests.ps1 index f81329b6a2f..05f759d7017 100644 --- a/test/common/markdown/markdown.tests.ps1 +++ b/test/common/markdown/markdown.tests.ps1 @@ -22,10 +22,7 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' { if(!(Get-Command -Name 'gulp' -ErrorAction SilentlyContinue)) { start-nativeExecution { - # Installing globally with yarn is a pain, please don't try it - sudo npm install -g 'gulp@4.0.0' --silent - # Sometimes this folder is left behind with root permissions and is needed by later NPM installs which don't need sudo - sudo rm -rf ~/.npm/_cacache + sudo yarn global add 'gulp@4.0.0' } } if(!(Get-Command -Name 'node' -ErrorAction SilentlyContinue)) From cce844fe2235c83cc201203ea03dba89a687d7ba Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 07:46:50 -0700 Subject: [PATCH 2/7] fix --- test/common/markdown/markdown-link.tests.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/common/markdown/markdown-link.tests.ps1 b/test/common/markdown/markdown-link.tests.ps1 index 542327a8856..3526810eac1 100644 --- a/test/common/markdown/markdown-link.tests.ps1 +++ b/test/common/markdown/markdown-link.tests.ps1 @@ -8,9 +8,7 @@ Describe "Verify Markdown Links" { { Write-Verbose "installing markdown-link-check ..." -Verbose start-nativeExecution { - sudo npm install -g markdown-link-check@3.7.2 - # Sometimes this folder is left behind with root permissions and is needed by later NPM installs which don't need sudo - sudo rm -rf ~/.npm/_cacache + sudo yarn global add markdown-link-check@3.7.2 } } @@ -49,7 +47,7 @@ Describe "Verify Markdown Links" { $jobs.add($group.name,$job) } - Write-Verbose -verbose "Getting and printing results ..." + Write-Verbose -verbose "Getting results ..." # Get the results and verify foreach($key in $jobs.keys) { @@ -105,7 +103,8 @@ Describe "Verify Markdown Links" { if($url -match '^http(s)?:') { # If invoke-WebRequest can handle the URL, re-verify, with 5 retries - try{ + try + { $null = Invoke-WebRequest -uri $url -RetryIntervalSec 3 -MaximumRetryCount 6 } catch From c11ed871fd46b397956ba947611cba6208fc455e Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 07:47:52 -0700 Subject: [PATCH 3/7] Update package.json --- test/common/markdown/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/markdown/package.json b/test/common/markdown/package.json index a55f2c778b3..e06d3a2e0d0 100644 --- a/test/common/markdown/package.json +++ b/test/common/markdown/package.json @@ -1,7 +1,7 @@ { "name": "powershell.common.markdown.tests", "version": "1.0.0", - "description": "The PowerShell Common MarkDown Tests.", + "description": "The PowerShell Common Markdown Tests.", "main": "gulpfile.js", "dependencies": { "gulp": "^4.0.2", From 12967e544a98152e165345c81874ef0de4478a91 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 07:49:33 -0700 Subject: [PATCH 4/7] Delete cleanup.ps1 --- test/common/markdown/cleanup.ps1 | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 test/common/markdown/cleanup.ps1 diff --git a/test/common/markdown/cleanup.ps1 b/test/common/markdown/cleanup.ps1 deleted file mode 100644 index 90aa1d38016..00000000000 --- a/test/common/markdown/cleanup.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -Start-Process ` --FilePath "npm" ` --ArgumentList @('install','rimraf','-g','--silent') ` --Wait ` --WorkingDirectory $PSScriptRoot ` --NoNewWindow -Start-Process ` --FilePath "rimraf" ` --ArgumentList @(Join-Path -Path $PSScriptRoot -ChildPath 'node_modules') ` --Wait ` --WorkingDirectory $PSScriptRoot ` --NoNewWindow From d100f7a9581639bf1c91f6db8dbf981c7ea9f975 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 07:54:03 -0700 Subject: [PATCH 5/7] Update package.json --- test/common/markdown/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/test/common/markdown/package.json b/test/common/markdown/package.json index e06d3a2e0d0..bc50ef1040b 100644 --- a/test/common/markdown/package.json +++ b/test/common/markdown/package.json @@ -1,5 +1,6 @@ { "name": "powershell.common.markdown.tests", + "private": true, "version": "1.0.0", "description": "The PowerShell Common Markdown Tests.", "main": "gulpfile.js", From 8eab05782ea79323cbcc2660396e5ad594c65bb6 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 07:57:58 -0700 Subject: [PATCH 6/7] Update misc-analysis.yml --- .vsts-ci/misc-analysis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.vsts-ci/misc-analysis.yml b/.vsts-ci/misc-analysis.yml index f8504fd730f..d9e7aa46e98 100644 --- a/.vsts-ci/misc-analysis.yml +++ b/.vsts-ci/misc-analysis.yml @@ -44,10 +44,7 @@ jobs: condition: succeededOrFailed() - bash: | - # Installing globally with yarn is a pain, please don't try - sudo npm install -g markdown-spellcheck@0.11.0 - # Sometimes this folder is left behind with root permissions and is needed by later npm installs which don't need sudo - sudo rm -rf ~/.npm/_cacache + sudo yarn global add markdown-spellcheck@0.11.0 displayName: Install mdspell condition: succeededOrFailed() From 1d3db6909edffe5d452d7d78c21f21d495b229d1 Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Sat, 15 Jun 2019 08:08:37 -0700 Subject: [PATCH 7/7] reload