Compare commits

...

24 Commits

Author SHA1 Message Date
github-actions[bot]
48b638b2a7
Update versions-manifest (#201)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2025-03-27 23:21:45 -05:00
github-actions[bot]
70176e8e7f
Update versions-manifest (#200)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2025-03-13 22:09:00 -05:00
github-actions[bot]
b8e2e0988f
Update versions-manifest (#199)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2025-02-20 22:07:32 -06:00
github-actions[bot]
6f7e07ce98
Update versions-manifest (#198)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2025-02-11 21:57:10 -06:00
github-actions[bot]
759e7130a4
Update versions-manifest (#197)
Some checks are pending
CodeQL analysis / CodeQL analysis (push) Waiting to run
Co-authored-by: Service account <no-reply@microsoft.com>
2025-02-10 21:43:38 -06:00
github-actions[bot]
708c79f819
Update versions-manifest (#196)
Some checks failed
Validate manifest / manifest (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2025-01-22 10:26:28 -06:00
github-actions[bot]
ff0573dc52
Update versions-manifest (#195)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2025-01-09 12:59:15 -06:00
github-actions[bot]
f3742acb8e
Update versions-manifest (#194)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Validate manifest / manifest (push) Failing after 1s
Co-authored-by: Service account <no-reply@microsoft.com>
2024-12-04 09:56:04 -06:00
github-actions[bot]
b5d073fd75
Update versions-manifest (#193)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2024-11-20 22:34:20 -06:00
github-actions[bot]
07972c08eb
Update versions-manifest (#192)
Some checks failed
CodeQL analysis / CodeQL analysis (push) Failing after 0s
Get Node versions / get-new-node-versions (push) Failing after 0s
Validate manifest / manifest (push) Failing after 0s
Co-authored-by: Service account <no-reply@microsoft.com>
2024-11-13 10:18:36 -06:00
github-actions[bot]
1089754c37
Update versions-manifest (#191)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-11-03 21:30:21 -06:00
github-actions[bot]
d0b553a9eb
Update versions-manifest (#190)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-17 11:15:27 -05:00
github-actions[bot]
09e0810728
Update versions-manifest (#189)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-10-07 11:23:01 -05:00
github-actions[bot]
83c0f2d854
Update versions-manifest (#188)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-09-18 09:50:38 -05:00
github-actions[bot]
1dda8b0c7d
Update versions-manifest (#187)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-09-04 07:22:46 -05:00
github-actions[bot]
a09329c1fa
Update versions-manifest (#186)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-23 09:29:44 -05:00
github-actions[bot]
75581b6027
Update versions-manifest (#185)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-22 10:42:10 -05:00
github-actions[bot]
bb9d406a6c
Update versions-manifest (#184)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-08-07 10:06:51 -05:00
github-actions[bot]
4638058663
Update versions-manifest (#183)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-25 08:35:31 -05:00
github-actions[bot]
c749aff12a
Update versions-manifest (#182) 2024-07-22 05:17:51 -05:00
github-actions[bot]
aacaf58011
Update versions-manifest (#181)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-18 08:42:01 -05:00
github-actions[bot]
5b159cbd4a
Update versions-manifest (#180)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-10 08:42:19 -05:00
gowridurgad
c8cf9cb4b5
Implementing Runner-Specific Node.js Tests (#178)
* Update Node.Tests.ps1

* Update Node.Tests.ps1

* Update Node.Tests.ps1

---------

Co-authored-by: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com>
2024-07-09 10:01:27 -05:00
github-actions[bot]
3a7a3835dd
Update versions-manifest (#179)
Co-authored-by: Service account <no-reply@microsoft.com>
2024-07-03 08:43:36 -05:00
2 changed files with 1195 additions and 20 deletions

View File

@ -1,20 +1,23 @@
Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1")
BeforeAll {
function Get-UseNodeLogs {
# GitHub Windows images don't have `HOME` variable
$homeDir = $env:HOME ?? $env:HOMEDRIVE
$logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve
$useNodeLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object {
$logContent = Get-Content $_.Fullname -Raw
return $logContent -match "setup-node@v"
} | Select-Object -First 1
return $useNodeLogFile.Fullname
}
}
Describe "Node.js" {
BeforeAll {
function Get-UseNodeLogs {
# GitHub Windows images don't have `HOME` variable
$homeDir = $env:HOME ?? $env:HOMEDRIVE
$logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve
$useNodeLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object {
$logContent = Get-Content $_.Fullname -Raw
return $logContent -match "setup-node@v"
} | Select-Object -First 1
return $useNodeLogFile.Fullname
}
}
It "is available" {
"node --version" | Should -ReturnZeroExitCode
}
@ -34,15 +37,25 @@ Describe "Node.js" {
$nodePath.startsWith($expectedPath) | Should -BeTrue -Because "'$nodePath' is not started with '$expectedPath'"
}
It "cached version is used without downloading" {
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
$useNodeLogFile = Get-UseNodeLogs
$useNodeLogFile | Should -Exist
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
$useNodeLogContent | Should -Match "Found in cache"
}
It "cached version is used without downloading" {
if ($env:RUNNER_TYPE -eq "self-hosted") {
# Get the installed version of Node.js
$nodeVersion = Invoke-Expression "node --version"
# Check if Node.js is installed
$nodeVersion | Should -Not -BeNullOrEmpty
# Check if the installed version of Node.js is the expected version
$nodeVersion | Should -Match $env:VERSION
}else {
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
$useNodeLogFile = Get-UseNodeLogs
$useNodeLogFile | Should -Exist
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
$useNodeLogContent | Should -Match "Found in cache"
}
}
It "Run simple code" {
"node ./simple-test.js" | Should -ReturnZeroExitCode
}
}
}

File diff suppressed because it is too large Load Diff