Compare commits

..

6 Commits

Author SHA1 Message Date
gowridurgad
60483efd43 Update build-node-packages.yml 2024-06-24 12:01:33 +05:30
gowridurgad
2a0a14464d Update build-node-packages.yml 2024-06-24 11:34:44 +05:30
gowridurgad
6f65b03397 Update build-node-packages.yml 2024-06-24 10:24:34 +05:30
gowridurgad
323bbcb287 Update build-node-packages.yml 2024-06-24 10:21:49 +05:30
gowridurgad
e7bfaeeff8 Update build-node-packages.yml 2024-06-20 16:24:07 +05:30
gowridurgad
fec77fe998 Update build-node-packages.yml 2024-06-20 16:22:11 +05:30
3 changed files with 22 additions and 376 deletions

View File

@@ -23,9 +23,9 @@ on:
jobs: jobs:
node: node:
name: Node name: Node
uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@main uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@testingarm64
with: with:
tool-name: "node" tool-name: "node"
tool-version: ${{ inputs.VERSION || '18.12.0' }} tool-version: ${{ inputs.VERSION || '18.12.0' }}
publish-release: ${{ inputs.PUBLISH_RELEASES || false }} publish-release: ${{ inputs.PUBLISH_RELEASES || false }}
secrets: inherit secrets: inherit

View File

@@ -1,23 +1,20 @@
Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1") 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" { 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" { It "is available" {
"node --version" | Should -ReturnZeroExitCode "node --version" | Should -ReturnZeroExitCode
} }
@@ -37,25 +34,15 @@ Describe "Node.js" {
$nodePath.startsWith($expectedPath) | Should -BeTrue -Because "'$nodePath' is not started with '$expectedPath'" $nodePath.startsWith($expectedPath) | Should -BeTrue -Because "'$nodePath' is not started with '$expectedPath'"
} }
It "cached version is used without downloading" { It "cached version is used without downloading" {
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
if ($env:RUNNER_TYPE -eq "self-hosted") { $useNodeLogFile = Get-UseNodeLogs
# Get the installed version of Node.js $useNodeLogFile | Should -Exist
$nodeVersion = Invoke-Expression "node --version" $useNodeLogContent = Get-Content $useNodeLogFile -Raw
# Check if Node.js is installed $useNodeLogContent | Should -Match "Found in cache"
$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" { It "Run simple code" {
"node ./simple-test.js" | Should -ReturnZeroExitCode "node ./simple-test.js" | Should -ReturnZeroExitCode
} }
} }

View File

@@ -1,219 +1,4 @@
[ [
{
"version": "22.5.1",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/22.5.1-10010673511",
"files": [
{
"filename": "node-22.5.1-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.1-10010673511/node-22.5.1-darwin-arm64.tar.gz"
},
{
"filename": "node-22.5.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.1-10010673511/node-22.5.1-darwin-x64.tar.gz"
},
{
"filename": "node-22.5.1-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.1-10010673511/node-22.5.1-linux-arm64.tar.gz"
},
{
"filename": "node-22.5.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.1-10010673511/node-22.5.1-linux-x64.tar.gz"
},
{
"filename": "node-22.5.1-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.1-10010673511/node-22.5.1-win32-arm64.7z"
},
{
"filename": "node-22.5.1-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.1-10010673511/node-22.5.1-win32-x64.7z"
}
]
},
{
"version": "22.5.0",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/22.5.0-9985144103",
"files": [
{
"filename": "node-22.5.0-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.0-9985144103/node-22.5.0-darwin-arm64.tar.gz"
},
{
"filename": "node-22.5.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.0-9985144103/node-22.5.0-darwin-x64.tar.gz"
},
{
"filename": "node-22.5.0-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.0-9985144103/node-22.5.0-linux-arm64.tar.gz"
},
{
"filename": "node-22.5.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.0-9985144103/node-22.5.0-linux-x64.tar.gz"
},
{
"filename": "node-22.5.0-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.0-9985144103/node-22.5.0-win32-arm64.7z"
},
{
"filename": "node-22.5.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.5.0-9985144103/node-22.5.0-win32-x64.7z"
}
]
},
{
"version": "22.4.1",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/22.4.1-9860948056",
"files": [
{
"filename": "node-22.4.1-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.1-9860948056/node-22.4.1-darwin-arm64.tar.gz"
},
{
"filename": "node-22.4.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.1-9860948056/node-22.4.1-darwin-x64.tar.gz"
},
{
"filename": "node-22.4.1-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.1-9860948056/node-22.4.1-linux-arm64.tar.gz"
},
{
"filename": "node-22.4.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.1-9860948056/node-22.4.1-linux-x64.tar.gz"
},
{
"filename": "node-22.4.1-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.1-9860948056/node-22.4.1-win32-arm64.7z"
},
{
"filename": "node-22.4.1-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.1-9860948056/node-22.4.1-win32-x64.7z"
}
]
},
{
"version": "22.4.0",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/22.4.0-9766506602",
"files": [
{
"filename": "node-22.4.0-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.0-9766506602/node-22.4.0-darwin-arm64.tar.gz"
},
{
"filename": "node-22.4.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.0-9766506602/node-22.4.0-darwin-x64.tar.gz"
},
{
"filename": "node-22.4.0-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.0-9766506602/node-22.4.0-linux-arm64.tar.gz"
},
{
"filename": "node-22.4.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.0-9766506602/node-22.4.0-linux-x64.tar.gz"
},
{
"filename": "node-22.4.0-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.0-9766506602/node-22.4.0-win32-arm64.7z"
},
{
"filename": "node-22.4.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.4.0-9766506602/node-22.4.0-win32-x64.7z"
}
]
},
{
"version": "22.3.0",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/22.3.0-9569309553",
"files": [
{
"filename": "node-22.3.0-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.3.0-9569309553/node-22.3.0-darwin-arm64.tar.gz"
},
{
"filename": "node-22.3.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/22.3.0-9569309553/node-22.3.0-darwin-x64.tar.gz"
},
{
"filename": "node-22.3.0-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.3.0-9569309553/node-22.3.0-linux-arm64.tar.gz"
},
{
"filename": "node-22.3.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/22.3.0-9569309553/node-22.3.0-linux-x64.tar.gz"
},
{
"filename": "node-22.3.0-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.3.0-9569309553/node-22.3.0-win32-arm64.7z"
},
{
"filename": "node-22.3.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/22.3.0-9569309553/node-22.3.0-win32-x64.7z"
}
]
},
{ {
"version": "22.2.0", "version": "22.2.0",
"stable": true, "stable": true,
@@ -343,94 +128,6 @@
} }
] ]
}, },
{
"version": "20.15.1",
"stable": true,
"lts": "Iron",
"release_url": "https://github.com/actions/node-versions/releases/tag/20.15.1-9860950555",
"files": [
{
"filename": "node-20.15.1-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.1-9860950555/node-20.15.1-darwin-arm64.tar.gz"
},
{
"filename": "node-20.15.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.1-9860950555/node-20.15.1-darwin-x64.tar.gz"
},
{
"filename": "node-20.15.1-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.1-9860950555/node-20.15.1-linux-arm64.tar.gz"
},
{
"filename": "node-20.15.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.1-9860950555/node-20.15.1-linux-x64.tar.gz"
},
{
"filename": "node-20.15.1-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.1-9860950555/node-20.15.1-win32-arm64.7z"
},
{
"filename": "node-20.15.1-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.1-9860950555/node-20.15.1-win32-x64.7z"
}
]
},
{
"version": "20.15.0",
"stable": true,
"lts": "Iron",
"release_url": "https://github.com/actions/node-versions/releases/tag/20.15.0-9607683765",
"files": [
{
"filename": "node-20.15.0-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.0-9607683765/node-20.15.0-darwin-arm64.tar.gz"
},
{
"filename": "node-20.15.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.0-9607683765/node-20.15.0-darwin-x64.tar.gz"
},
{
"filename": "node-20.15.0-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.0-9607683765/node-20.15.0-linux-arm64.tar.gz"
},
{
"filename": "node-20.15.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.0-9607683765/node-20.15.0-linux-x64.tar.gz"
},
{
"filename": "node-20.15.0-win32-arm64.7z",
"arch": "arm64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.0-9607683765/node-20.15.0-win32-arm64.7z"
},
{
"filename": "node-20.15.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/20.15.0-9607683765/node-20.15.0-win32-x64.7z"
}
]
},
{ {
"version": "20.14.0", "version": "20.14.0",
"stable": true, "stable": true,
@@ -1161,44 +858,6 @@
} }
] ]
}, },
{
"version": "18.20.4",
"stable": true,
"lts": "Hydrogen",
"release_url": "https://github.com/actions/node-versions/releases/tag/18.20.4-9860952736",
"files": [
{
"filename": "node-18.20.4-darwin-arm64.tar.gz",
"arch": "arm64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/18.20.4-9860952736/node-18.20.4-darwin-arm64.tar.gz"
},
{
"filename": "node-18.20.4-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/18.20.4-9860952736/node-18.20.4-darwin-x64.tar.gz"
},
{
"filename": "node-18.20.4-linux-arm64.tar.gz",
"arch": "arm64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/18.20.4-9860952736/node-18.20.4-linux-arm64.tar.gz"
},
{
"filename": "node-18.20.4-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/18.20.4-9860952736/node-18.20.4-linux-x64.tar.gz"
},
{
"filename": "node-18.20.4-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/18.20.4-9860952736/node-18.20.4-win32-x64.7z"
}
]
},
{ {
"version": "18.20.3", "version": "18.20.3",
"stable": true, "stable": true,