mirror of
https://github.com/actions/node-versions.git
synced 2025-03-15 13:47:23 +00:00
Compare commits
No commits in common. "main" and "20.6.0-6092715008" have entirely different histories.
main
...
20.6.0-609
@ -11,8 +11,5 @@ Latest of LTS versions will be installed on the [runner-images](https://github.c
|
||||
## Adding new versions
|
||||
We are trying to prepare packages for new versions of Node.js as soon as they are released. Please open an issue in [actions/runner-images](https://github.com/actions/runner-images) if any versions are missing.
|
||||
|
||||
## Support Notification Policy
|
||||
Beginning **approximately six months prior** to the removal of a Node.js version from the [versions-manifest.json](https://github.com/actions/node-versions/blob/main/versions-manifest.json) file, a pinned issue will be created in the [setup-node](https://github.com/actions/setup-node) repository. This pinned issue will provide important details about the upcoming end of support, including the specific date, as well as any other notes, relevant updates or alternatives. We encourage users to regularly check pinned issues for updates on tool versions they are using for maximum transparency, security, performance and overall compatibility with their projects.
|
||||
|
||||
## Contribution
|
||||
Contributions are welcome! See [Contributor's Guide](./CONTRIBUTING.md) for more details about contribution process and code structure
|
||||
|
@ -54,7 +54,7 @@ class NixNodeBuilder : NodeBuilder {
|
||||
$installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath $this.InstallationTemplateName
|
||||
|
||||
$installationTemplateContent = Get-Content -Path $installationTemplateLocation -Raw
|
||||
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3), $this.Architecture
|
||||
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3)
|
||||
$installationTemplateContent | Out-File -FilePath $installationScriptLocation
|
||||
|
||||
Write-Debug "Done; Installation script location: $installationScriptLocation)"
|
||||
|
2
helpers
2
helpers
@ -1 +1 @@
|
||||
Subproject commit 6fbb1f0f2098254142702dba05fe75cd8e77c4ae
|
||||
Subproject commit b964a9871b5d9c7ae9b11f790745ce9d0aa7e7dd
|
@ -1,11 +1,10 @@
|
||||
set -e
|
||||
|
||||
NODE_VERSION={0}
|
||||
ARCH={1}
|
||||
|
||||
NODE_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/node
|
||||
NODE_TOOLCACHE_VERSION_PATH=$NODE_TOOLCACHE_PATH/$NODE_VERSION
|
||||
NODE_TOOLCACHE_VERSION_ARCH_PATH=$NODE_TOOLCACHE_VERSION_PATH/$ARCH
|
||||
NODE_TOOLCACHE_VERSION_ARCH_PATH=$NODE_TOOLCACHE_VERSION_PATH/x64
|
||||
|
||||
echo "Check if Node.js hostedtoolcache folder exist..."
|
||||
if [ ! -d $NODE_TOOLCACHE_PATH ]; then
|
||||
@ -23,4 +22,4 @@ cp -R ./* $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||
rm $NODE_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
|
||||
|
||||
echo "Create complete file"
|
||||
touch $NODE_TOOLCACHE_VERSION_PATH/$ARCH.complete
|
||||
touch $NODE_TOOLCACHE_VERSION_PATH/x64.complete
|
||||
|
@ -1,23 +1,20 @@
|
||||
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
|
||||
}
|
||||
@ -37,25 +34,15 @@ Describe "Node.js" {
|
||||
$nodePath.startsWith($expectedPath) | Should -BeTrue -Because "'$nodePath' is not started with '$expectedPath'"
|
||||
}
|
||||
|
||||
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 "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 "Run simple code" {
|
||||
"node ./simple-test.js" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user