mirror of
https://github.com/actions/node-versions.git
synced 2025-04-20 02:43:49 +00:00
Update Node.Tests.ps1
This commit is contained in:
parent
921e8d9f35
commit
f89b01ffb0
@ -39,19 +39,21 @@ Describe "Node.js" {
|
|||||||
Write-Host "OS: $($env:OS)"
|
Write-Host "OS: $($env:OS)"
|
||||||
}
|
}
|
||||||
|
|
||||||
It "cached version is used without downloading" {
|
It "cached version is used without downloading" {
|
||||||
# Check the architecture and OS before running the test
|
# Set a custom variable to check for architecture and OS
|
||||||
if (($env:PROCESSOR_ARCHITECTURE -ne 'ARM64') -or (($env:OS -ne 'Windows_NT') -and ($env:OS -ne 'Linux'))) {
|
$isArm64WindowsOrLinux = if ((uname -m) -eq 'aarch64' -and ((uname -o) -eq 'GNU/Linux' -or $IsWindows)) {$true} else {$false}
|
||||||
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
|
|
||||||
$useNodeLogFile = Get-UseNodeLogs
|
if (!$isArm64WindowsOrLinux) {
|
||||||
$useNodeLogFile | Should -Exist
|
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
|
||||||
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
$useNodeLogFile = Get-UseNodeLogs
|
||||||
$useNodeLogContent | Should -Match "Found in cache"
|
$useNodeLogFile | Should -Exist
|
||||||
} else {
|
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
||||||
# Skip the test for arm64 on Windows and Linux
|
$useNodeLogContent | Should -Match "Found in cache"
|
||||||
Set-ItResult -Skipped -Because "Skipping this test for arm64 on Windows and Linux"
|
} else {
|
||||||
}
|
# Skip the test for arm64 on Windows and Linux
|
||||||
|
Set-ItResult -Skipped -Because "Skipping this test for arm64 on Windows and Linux"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
It "Run simple code" {
|
It "Run simple code" {
|
||||||
|
Loading…
Reference in New Issue
Block a user